浏览代码

APPSet修改bug

zhangdongming 2 年之前
父节点
当前提交
467a2bb1f3
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      Controller/AppSetController.py

+ 6 - 5
Controller/AppSetController.py

@@ -210,11 +210,12 @@ class AppSetView(View):
         if not user_ai_log_qs.exists():
             popups_status = 1
             UserOperationLog.objects.create(**user_log)
-        now_date = int(LocalDateTimeUtil.time_stamp_to_time(now_time, '%Y%m%d'))
-        created_date = int(LocalDateTimeUtil.time_stamp_to_time(user_ai_log_qs[0]['created_time'], '%Y%m%d'))
-        if user_ai_log_qs.count() == 1 and now_date > created_date:
-            popups_status = 1
-            UserOperationLog.objects.create(**user_log)
+        else:
+            now_date = int(LocalDateTimeUtil.time_stamp_to_time(now_time, '%Y%m%d'))
+            created_date = int(LocalDateTimeUtil.time_stamp_to_time(user_ai_log_qs[0]['created_time'], '%Y%m%d'))
+            if user_ai_log_qs.count() == 1 and now_date > created_date:
+                popups_status = 1
+                UserOperationLog.objects.create(**user_log)
         return {
             'title': popups_qs[0]['title'],
             'content': popups_qs[0]['content'],