Skip to content

Commit

Permalink
Remove default suffix in GenericModel class
Browse files Browse the repository at this point in the history
In some combinations of Python/Celery/Pydantic versions this would lead to:

_pickle.PicklingError: Can't pickle <class 'galaxy.schema.notifications.NotificationRecipientsIncoming'>: attribute lookup NotificationRecipientsIncoming on galaxy.schema.notifications failed

This is because the NotificationRecipientsIncoming dynamic model is not yet available in the module.
Removing the `Incoming` prefix will match the existing NotificationRecipients alias which is explicitly defined in the notifications module.
  • Loading branch information
davelopez committed Nov 20, 2024
1 parent f382305 commit e5f1123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/schema/generics.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __get_pydantic_core_schema__(cls, *args, **kwargs):

@classmethod
def __determine_suffix__(cls, params: Tuple[Type[Any], ...]) -> str:
suffix = "Incoming"
suffix = ""
if params[0] is EncodedDatabaseIdField:
suffix = "Response"
elif params[0] is DecodedDatabaseIdField:
Expand Down

0 comments on commit e5f1123

Please sign in to comment.