fix: metal archives artist sources
This commit is contained in:
@@ -81,6 +81,8 @@ class Collection(Generic[T]):
|
||||
:param merge_into_existing:
|
||||
:return did_not_exist:
|
||||
"""
|
||||
if element is None:
|
||||
return AppendResult(False, None, False)
|
||||
|
||||
# if the element type has been defined in the initializer it checks if the type matches
|
||||
if self.element_type is not None and not isinstance(element, self.element_type):
|
||||
|
||||
@@ -31,7 +31,7 @@ class DatabaseObject:
|
||||
"""
|
||||
_id = random.randint(0, HIGHEST_ID)
|
||||
self.automatic_id = True
|
||||
LOGGER.debug(f"Id for {type(self).__name__} isn't set. Setting to {_id}")
|
||||
# LOGGER.debug(f"Id for {type(self).__name__} isn't set. Setting to {_id}")
|
||||
|
||||
# The id can only be None, if the object is dynamic (self.dynamic = True)
|
||||
self.id: Optional[int] = _id
|
||||
|
||||
@@ -649,11 +649,12 @@ class Artist(MainObject):
|
||||
|
||||
return metadata
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self, include_notes: bool = False):
|
||||
string = self.name or ""
|
||||
plaintext_notes = self.notes.get_plaintext()
|
||||
if plaintext_notes is not None:
|
||||
string += "\n" + plaintext_notes
|
||||
if include_notes:
|
||||
plaintext_notes = self.notes.get_plaintext()
|
||||
if plaintext_notes is not None:
|
||||
string += "\n" + plaintext_notes
|
||||
return string
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
Reference in New Issue
Block a user