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

[#336] Archiefactiedatum validation [Backend] #337

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

SilviaAmAm
Copy link
Collaborator

Partly fixes #336

@SilviaAmAm SilviaAmAm marked this pull request as draft September 10, 2024 11:08
@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.60%. Comparing base (c4648d1) to head (6bd8dff).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #337      +/-   ##
==========================================
+ Coverage   77.44%   77.60%   +0.16%     
==========================================
  Files         223      223              
  Lines        7058     7109      +51     
  Branches      133      133              
==========================================
+ Hits         5466     5517      +51     
  Misses       1468     1468              
  Partials      124      124              

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

@SilviaAmAm SilviaAmAm force-pushed the feature/336-archiefactiedatum-validation branch from 33f11a8 to aa27bd3 Compare September 10, 2024 13:04
@SilviaAmAm SilviaAmAm marked this pull request as ready for review September 10, 2024 13:52
Copy link
Contributor

@svenvandescheur svenvandescheur left a comment

Choose a reason for hiding this comment

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

Question, if answer is no: approved anyway

@@ -249,6 +250,11 @@ def update(self, request, *args, **kwargs):
return super().update(request, *args, **kwargs)

def perform_destroy(self, instance: DestructionList) -> None:
if not instance.all_items_can_be_deleted():
raise ValidationError(
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 this be a ZaakArchiefactiedatumInFuture as well?

Copy link
Collaborator Author

@SilviaAmAm SilviaAmAm Sep 12, 2024

Choose a reason for hiding this comment

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

If I raise here the ZaakArchiefactiedatumInFuture then it will give a 500 error response, but if I raise the ValidationError then it will respond with a 400 status to the client.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense

@svenvandescheur svenvandescheur self-requested a review September 12, 2024 11:39
@svenvandescheur svenvandescheur merged commit eba1599 into main Sep 12, 2024
13 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.

Validatie Archiefactiedatum voor vernietigen
3 participants