update
This commit is contained in:
parent
a66a9ee56c
commit
65d5dc0920
@ -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'
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user