Commit d9dd0976 authored by Jean-samuel TETTEKPOE's avatar Jean-samuel TETTEKPOE
Browse files

get_all_field_names() deprecated

parent 0fdf0d90
Pipeline #9081 failed with stage
in 37 seconds
......@@ -61,7 +61,7 @@ class BaseTransactionSerializer(serializers.ModelSerializer):
raise Http404()
if request.user.has_perm('bars_transactions.add_' + data["type"] + 'transaction', bar):
fields = Transaction._meta.get_all_field_names()
fields = [f.name for f in Transaction._meta.get_fields()]
attrs = {k: v for k, v in list(data.items()) if k in fields}
t = Transaction(**attrs)
t.author = request.user
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment