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

Prevent exception when doing PUT and ZaakTypenRelatie already exists #875

Merged
merged 4 commits into from Mar 18, 2021

Conversation

shea-maykinmedia
Copy link
Contributor

Fixes #851

Changes

When doing a PUT on the zaaktypen endpoint we want to delete ZaakTypenRelatie that were previously created so that they can be recreated in this PUT request.

@codecov-io
Copy link

codecov-io commented Feb 25, 2021

Codecov Report

Merging #875 (e8d284d) into master (a60d2d4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #875   +/-   ##
=======================================
  Coverage   96.13%   96.13%           
=======================================
  Files         513      513           
  Lines       30817    30843   +26     
  Branches     1517     1518    +1     
=======================================
+ Hits        29625    29651   +26     
  Misses        938      938           
  Partials      254      254           
Impacted Files Coverage Δ
...nzaak/components/catalogi/api/viewsets/zaaktype.py 100.00% <100.00%> (ø)
...penzaak/components/catalogi/tests/test_zaaktype.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a60d2d4...e8d284d. Read the comment docs.

@shea-maykinmedia shea-maykinmedia changed the title [WIP] Fixes #851 -- Paint it black Fixes #851 -- Paint it black Feb 26, 2021
@shea-maykinmedia shea-maykinmedia changed the title Fixes #851 -- Paint it black Prevent exception when doing PUT and ZaakTypenRelatie already exists Feb 26, 2021
@sergei-maertens sergei-maertens added this to the Release 1.3.5 milestone Mar 8, 2021
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

Can you add a test where two existing relations are replaced by just a single one as well?

src/openzaak/components/catalogi/api/viewsets/zaaktype.py Outdated Show resolved Hide resolved
@sergei-maertens sergei-maertens merged commit 91770e2 into master Mar 18, 2021
@sergei-maertens sergei-maertens deleted the issue/fix-put-exception branch March 18, 2021 15:04
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.

Updating a zaaktype (PUT) raises an IntegrityError on gerelateerdeZaken
3 participants