|
|
@@ -370,10 +370,13 @@ class HomeThemeModelAPIView(APIView):
|
|
|
logo_url = request_data.get("logo_url")
|
|
|
title_name = request_data.get("title_name")
|
|
|
copyright = request_data.get("copyright")
|
|
|
- theme = HomeThemeModel.objects.filter(id=1).update(
|
|
|
- logo_url=logo_url,
|
|
|
- title_name=title_name,
|
|
|
- copyright=copyright
|
|
|
+ theme = HomeThemeModel.objects.update_or_create(
|
|
|
+ id = 1, defaults={
|
|
|
+ "logo_url": logo_url,
|
|
|
+ "title_name": title_name,
|
|
|
+ "copyright": copyright
|
|
|
+ }
|
|
|
+
|
|
|
)
|
|
|
if theme:
|
|
|
return Response({"code": 0, "msg": "success"})
|