diff --git a/dongtai_web/systemmonitor/data_clean.py b/dongtai_web/systemmonitor/data_clean.py index dc09ce41f..ef0018d82 100644 --- a/dongtai_web/systemmonitor/data_clean.py +++ b/dongtai_web/systemmonitor/data_clean.py @@ -63,7 +63,7 @@ def post(self, request): day_of_month='*', month_of_year='*', ) - PeriodicTask.objects.get_or_create( + PeriodicTask.objects.update_or_create( name='data clean functions', # simply describes this periodic task. defaults={ 'crontab': schedule, # we created this above.