mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Fix this
This commit is contained in:
parent
c651097d2f
commit
076b927584
@ -580,7 +580,7 @@ class CustomFieldSerializer(serializers.ModelSerializer):
|
||||
context = kwargs.get("context")
|
||||
self.api_version = int(
|
||||
context.get("request").version
|
||||
if context.get("request")
|
||||
if context and context.get("request")
|
||||
else settings.REST_FRAMEWORK["DEFAULT_VERSION"],
|
||||
)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user