mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
修复 无法修改 我的站点 信息的bug
This commit is contained in:
@@ -275,6 +275,11 @@ class MySiteAdmin(AjaxAdmin): # instead of ModelAdmin
|
||||
SignInInlines
|
||||
)
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
if obj.sp_hour == '':
|
||||
obj.sp_hour = 0
|
||||
obj.save()
|
||||
|
||||
def bonus(self, obj: MySite):
|
||||
status_today = obj.sitestatus_set.order_by('-pk').first()
|
||||
return format_html(
|
||||
|
||||
Reference in New Issue
Block a user