Open ElijahAhianyo opened 3 years ago
Also, I could take up this issue if you'd like me to :)
The __init__
call to serializer_permissions.serializers.ModelSerializer
is missing in the stack trace.
File "C:\Users\Clearspace User\Documents\Programming\QCS\qcs-v2-backend\apps\company\serializers.py", line 21, in CompanyProfileSerializer
company_phone_numbers = CompanyPhoneNumberSerializer(many=True, required=False, permissions=(permissions.IsAuthenticatedOrReadOnly, ))
File "C:\Users\Clearspace User\Documents\Programming\QCS\qcs-v2-backend\venv\lib\site-packages\rest_framework\serializers.py", line 121, in __new__
return cls.many_init(*args, **kwargs)
File "C:\Users\Clearspace User\Documents\Programming\QCS\qcs-v2-backend\venv\lib\site-packages\rest_framework\serializers.py", line 146, in many_init
child_serializer = cls(*args, **kwargs)
File "C:\Users\Clearspace User\Documents\Programming\QCS\qcs-v2-backend\venv\lib\site-packages\rest_framework\serializers.py", line 115, in __init__
super().__init__(**kwargs)
This should be:
File "/opt/virtualenvs/testenv/lib/python3.6/site-packages/mytestapp/serializers.py", line 42, in ResultListSerializer
submissions = ResultSerializer(many=True, help_text="Liste der abzufragenden Submissions", permissions=("asda",))
File "/opt/virtualenvs/testenv/lib/python3.6/site-packages/rest_framework/serializers.py", line 121, in __new__
return cls.many_init(*args, **kwargs)
File "/opt/virtualenvs/testenv/lib/python3.6/site-packages/serializer_permissions/serializers.py", line 65, in many_init
child_serializer = cls(*args, **kwargs)
File "/opt/virtualenvs/testenv/lib/python3.6/site-packages/serializer_permissions/mixins.py", line 7, in __init__
super().__init__(*args, **kwargs)
File "/opt/virtualenvs/testenv/lib/python3.6/site-packages/rest_framework/serializers.py", line 115, in __init__
super().__init__(**kwargs)
Can you check, if you are using serializer_permissions.serializers.ModelSerializer
as base class for CompanyPhoneNumberSerializer
Which django version and restframework version do you use?
Also, I could take up this issue if you'd like me to :)
If this is an issue in my library, I would be glad, if you provide a pull request :smiley:
have you solved the problem?
I am getting this error when I add a permissions argument in the Serializer. Heres the stack trace:
Heres my serializer serializer.py