make details for Comic, Artist and Issue clickable, add CustomField to select Comic and Issue
This commit is contained in:
@@ -125,6 +125,18 @@ class Issue(Base, BaseMixin):
|
||||
return works
|
||||
|
||||
|
||||
def get_artists(self) -> Dict[Any, List[Any]]:
|
||||
works: Dict[Any, List[Any]] = {}
|
||||
for work in self.issue_works:
|
||||
work_type = work.work_type
|
||||
artist = work.artist
|
||||
if work_type in works:
|
||||
works[work_type].append(artist)
|
||||
else:
|
||||
works[work_type] = [artist]
|
||||
return works
|
||||
|
||||
|
||||
class Artist(Base, BaseMixin):
|
||||
__tablename__ = "artist"
|
||||
name: Mapped[str] = mapped_column(nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user