main #151

Merged
charles merged 10 commits from main into prod 2026-07-31 15:14:59 +08:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 65d5dc0920 - Show all commits

View File

@ -32,8 +32,8 @@ async def news_article_add(ns={}):
'content_zh': ns.get('content_zh'),
'content_en': ns.get('content_en'),
'status': status,
'publish_time_zh': ns.get('publish_time_zh'),
'publish_time_en': ns.get('publish_time_en'),
'publish_time_zh': ns.get('publish_time_zh') or None,
'publish_time_en': ns.get('publish_time_en') or None,
'read_count': 0,
'del_flg': '0'
}

View File

@ -14,7 +14,10 @@ async def news_article_update(ns={}):
'cover_img_zh', 'cover_img_en', 'publish_time_zh', 'publish_time_en'
]:
if field in ns:
ns_dic[field] = ns.get(field)
if field in ['publish_time_zh', 'publish_time_en']:
ns_dic[field] = ns.get(field) or None
else:
ns_dic[field] = ns.get(field)
if 'status' in ns:
if ns.get('status') not in ['0', '1']:
return {