-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change Sublet Amenity Return Formatting #251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! One comment about tests and also current tests are failing (looks like its from decimal change). Suggest running tests locally once before pushing in the future
@@ -122,7 +122,9 @@ def destroy(self, instance): | |||
|
|||
|
|||
class SubletSerializerRead(serializers.ModelSerializer): | |||
amenities = AmenitySerializer(many=True, required=False) | |||
amenities = serializers.PrimaryKeyRelatedField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can we confirm this change by adding an additional check in one of our test cases? Should just be one additional assert
or something to assert that the type now returned is a list of strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! 19a351c checks this by a direct comparison to the expected string list output.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #251 +/- ##
=======================================
Coverage 91.37% 91.37%
=======================================
Files 59 59
Lines 2515 2515
=======================================
Hits 2298 2298
Misses 217 217 ☔ View full report in Codecov by Sentry. |
Previously, amenities were returned on Sublets as follows:
This pull request is to modify to a new formatting as follows:
Additionally, this pull request migrates the "baths" field on sublets to allow more one-decimal place numbers.