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

Sort attachments in API V2 for Outdoor Sites and Touristic Contents (refs #4071) #4072

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

babastienne
Copy link
Member

@babastienne babastienne commented Apr 15, 2024

Description

Related Issue

#4071

Checklist

  • I have followed the guidelines in our Contributing document
  • My code respects the Definition of done available in the Development section of the documentation
  • I have performed a self-review of my code
  • New and existing unit tests pass locally with my changes
  • I added an entry in the changelog file
  • My commits are all using prefix convention (emoji + tag name) and references associated issues
  • I added a label to the PR corresponding to the perimeter of my contribution
  • The title of my PR mentionned the issue associated

@babastienne babastienne requested a review from a team April 15, 2024 11:51
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.39%. Comparing base (aa572f7) to head (6bd3630).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4072   +/-   ##
=======================================
  Coverage   98.39%   98.39%           
=======================================
  Files         284      284           
  Lines       20785    20785           
=======================================
  Hits        20451    20451           
  Misses        334      334           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Apr 15, 2024

Passing run #8753 ↗︎

0 24 0 0 Flakiness 0

Details:

Merge 6bd3630 into aa572f7...
Project: Geotrek-admin Commit: a3f94fdd44 ℹ️
Status: Passed Duration: 02:21 💡
Started: Apr 15, 2024 12:01 PM Ended: Apr 15, 2024 12:03 PM

Review all test suite changes for PR #4072 ↗︎

@@ -488,7 +488,7 @@ def get_description_teaser(self, obj):
return get_translation_or_dict('description_teaser', self, obj)

class TouristicContentSerializer(TouristicModelSerializer):
attachments = AttachmentSerializer(many=True)
attachments = AttachmentSerializer(many=True, source='sorted_attachments')
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also add it on Infrastructure, SensitiveArea ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The attribute sorted_attachments is available with the PicturesMixin.

The PicturesMixin is not associated with the following objects (therefore we cannot do the same modification) :

  • Signage
  • Infrastructure
  • SensitiveArea

@babastienne babastienne merged commit 68f7821 into master Apr 15, 2024
16 checks passed
@babastienne babastienne deleted the fix_sorted_attachments_outdoor branch April 15, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants