fix api 500

This commit is contained in:
Your Name 2023-03-13 07:36:14 -04:00 committed by Henri Dickson
parent 8f8197abed
commit 889a58d6b8
3 changed files with 6 additions and 14 deletions

View file

@ -48,7 +48,7 @@ def get_movie(request, uuid: str):
return item
@api.get("/tvshow/{uuid}/", response=TVShowSchema)
@api.get("/tv/{uuid}/", response=TVShowSchema)
def get_tvshow(request, uuid: str):
item = TVShow.get_by_url(uuid)
if not item:

View file

@ -5,7 +5,7 @@ from django.db import models
class MovieInSchema(ItemInSchema):
orig_title: str | None = None
other_title: list[str]
other_title: str | None = None
director: list[str]
playwright: list[str]
actor: list[str]
@ -52,12 +52,8 @@ class Movie(Item):
orig_title = jsondata.CharField(
verbose_name=_("原始标题"), blank=True, default="", max_length=500
)
other_title = jsondata.ArrayField(
base_field=models.CharField(blank=True, default="", max_length=500),
verbose_name=_("其他标题"),
null=True,
blank=True,
default=list,
other_title = jsondata.CharField(
verbose_name=_("其他标题"), blank=True, default="", max_length=500
)
director = jsondata.ArrayField(
verbose_name=_("导演"),

View file

@ -106,12 +106,8 @@ class TVShow(Item):
orig_title = jsondata.CharField(
verbose_name=_("原始标题"), blank=True, default="", max_length=500
)
other_title = jsondata.ArrayField(
base_field=models.CharField(blank=True, default="", max_length=500),
verbose_name=_("其他标题"),
null=True,
blank=True,
default=list,
other_title = jsondata.CharField(
verbose_name=_("其他标题"), blank=True, default="", max_length=500
)
director = jsondata.ArrayField(
verbose_name=_("导演"),