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

[#1524] Make onderwerpen in contact form orderable #684

Merged

Conversation

vaszig
Copy link
Contributor

@vaszig vaszig commented Jun 20, 2023

No description provided.

@vaszig vaszig marked this pull request as draft June 20, 2023 14:45
@codecov-commenter
Copy link

Codecov Report

Merging #684 (187a6d1) into develop (8c950d2) will decrease coverage by 0.01%.
The diff coverage is 92.00%.

@@             Coverage Diff             @@
##           develop     #684      +/-   ##
===========================================
- Coverage    96.26%   96.26%   -0.01%     
===========================================
  Files          631      634       +3     
  Lines        22466    22488      +22     
===========================================
+ Hits         21628    21648      +20     
- Misses         838      840       +2     
Impacted Files Coverage Δ
...er/openklant/migrations/0005_auto_20230620_1419.py 77.77% <77.77%> (ø)
src/open_inwoner/openklant/admin.py 78.57% <100.00%> (+2.57%) ⬆️
...er/openklant/migrations/0004_auto_20230620_1419.py 100.00% <100.00%> (ø)
.../migrations/0006_alter_contactformsubject_order.py 100.00% <100.00%> (ø)
src/open_inwoner/openklant/models.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vaszig vaszig force-pushed the feature/1524-make-contactform-onderwerpen-orderable branch from 187a6d1 to b731c91 Compare June 21, 2023 09:26
@vaszig vaszig force-pushed the feature/1524-make-contactform-onderwerpen-orderable branch from b731c91 to efa337d Compare June 21, 2023 09:45
@vaszig vaszig requested a review from Bartvaderkin June 21, 2023 10:43
@vaszig vaszig marked this pull request as ready for review June 21, 2023 11:21
Copy link
Contributor

@Bartvaderkin Bartvaderkin left a comment

Choose a reason for hiding this comment

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

Cool. I've put a small note for the future.

Comment on lines +8 to +10
for subject in Subject.objects.all():
subject.order = subject.pk
subject.save()
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically this could have been an Subject.objects.update(order=F('id')) so it doesn't need to load all the records from the database to python and back, but it doesn't matter too much in this case.

@alextreme alextreme merged commit eef6397 into develop Jun 22, 2023
@alextreme alextreme deleted the feature/1524-make-contactform-onderwerpen-orderable branch June 22, 2023 11:02
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.

4 participants