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

Fix get rules from order with option value instead of option code #4269

Merged

Conversation

svandeneertwegh
Copy link
Contributor

@svandeneertwegh svandeneertwegh commented Apr 1, 2024

This fixes showing order lines with the option value instead of the code.

#4263

@@ -698,10 +698,10 @@ def description(self):
value = attribute.value
if isinstance(value, list):
ops.append(
"%s = '%s'" % (attribute.type, (", ".join([str(v) for v in value])))
"%s = '%s'" % (attribute.option.name, (", ".join([str(v) for v in value])))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be attribute.value because the option could be empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When you look at another abstract_models. For example at baskets module, it is also like i changed.

@@ -55,7 +55,7 @@ def setUp(self):
upc="1234",
)
product.attr.weight = 3
product.full_clean()
# product.full_clean()
Copy link
Contributor

Choose a reason for hiding this comment

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

oeps

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Merging #4269 (d7220a0) into master (cb93f5e) will increase coverage by 0.51%.
Report is 19 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4269      +/-   ##
==========================================
+ Coverage   87.84%   88.35%   +0.51%     
==========================================
  Files         291      293       +2     
  Lines       16145    16083      -62     
==========================================
+ Hits        14182    14210      +28     
+ Misses       1963     1873      -90     
Files Coverage Δ
src/oscar/apps/order/abstract_models.py 93.08% <100.00%> (-0.07%) ⬇️

... and 10 files with indirect coverage changes

@viggo-devries viggo-devries merged commit c2c87f0 into django-oscar:master Apr 22, 2024
22 of 23 checks passed
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.

None yet

2 participants