chore: make converters work with model ids

This commit is contained in:
Éloi Rivard 2024-12-02 17:44:08 +01:00
parent 32d8010e6f
commit eb955ad5dc
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184

View file

@ -96,7 +96,7 @@ def model_converter(model):
super().__init__(self, *args, **kwargs)
def to_url(self, instance):
return instance.identifier
return instance.identifier or instance.id
def to_python(self, identifier):
current_app.backend.setup()