Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix optiongroupserializer missing #344

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

svandeneertwegh
Copy link

Added:
option_group = AttributeOptionGroupSerializer()

to:

class OptionSerializer(OscarHyperlinkedModelSerializer):

in file: oscarapi/serializers/product.py

@svandeneertwegh
Copy link
Author

This fixes the problem mentioned at #324 !

@@ -186,6 +186,7 @@ class Meta:


class OptionSerializer(OscarHyperlinkedModelSerializer):
option_group = AttributeOptionGroupSerializer()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I think this should be optional, the tests are failing atm!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think it is important to demonstrate the problem in a test, to make sure there are no regressions in the future

@svandeneertwegh
Copy link
Author

@specialunderwear when this is not applied i get errors on admin endpoints when i set:
OSCARAPI_BLOCK_ADMIN_API_ACCESS = False

Makefile Outdated
@@ -22,7 +22,7 @@ coverage:
coverage run sandbox/manage.py test oscarapi --settings=sandbox.settings.block_admin_api_true
coverage run sandbox/manage.py test oscarapi --settings=sandbox.settings.block_admin_api_false
coverage report -m
coverage xml -i
coverage xml -i
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be a tab, you broke the tests by making them spaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants