diff --git a/src/elody/csv.py b/src/elody/csv.py index f3d6e86..3c6f272 100644 --- a/src/elody/csv.py +++ b/src/elody/csv.py @@ -210,7 +210,7 @@ def __fill_objects_from_csv(self): options = metadata_info.get("value_options") if options and value not in options: raise InvalidValueException( - f"The value \"{value}\" is invalid, these are the valid values: {options}" + f'The value "{value}" is invalid, these are the valid values: {options}' ) indexed_dict[type][id]["metadata"].append( self._get_metadata_object(metadata_key, value) diff --git a/src/elody/exceptions.py b/src/elody/exceptions.py index 6e70e31..17bca63 100644 --- a/src/elody/exceptions.py +++ b/src/elody/exceptions.py @@ -31,9 +31,11 @@ class InvalidExtensionException(Exception): class InvalidObjectException(Exception): pass + class InvalidValueException(Exception): pass + class NoMediafilesException(Exception): pass diff --git a/src/elody/util.py b/src/elody/util.py index 9a8bf24..eb52a01 100644 --- a/src/elody/util.py +++ b/src/elody/util.py @@ -230,7 +230,8 @@ def signal_entity_deleted(mq_client, entity): def signal_mediafiles_added_for_entity(mq_client, entity, mediafiles): data = {"entity": entity, "mediafiles": mediafiles} send_cloudevent(mq_client, "dams", "dams.mediafiles_added_for_entity", data) - + + def signal_relations_deleted_for_entity(mq_client, entity, relations): data = {"entity": entity, "relations": relations} send_cloudevent(mq_client, "dams", "dams.relations_deleted_for_entity", data)