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

Creating Partij in Admin Interface results in a 500 error #303

Open
sytskevanhasselt opened this issue Dec 11, 2024 · 4 comments
Open

Creating Partij in Admin Interface results in a 500 error #303

sytskevanhasselt opened this issue Dec 11, 2024 · 4 comments
Labels
bug Something isn't working triage

Comments

@sytskevanhasselt
Copy link

sytskevanhasselt commented Dec 11, 2024

Product versie / Product version

2.4.0 83f9aec

Omschrijf het probleem / Describe the bug

I tried to create a Partij through the Admin interface. I clicked "Opslaan en opnieuw bewerken", because i wanted to Add a partijIdenficator next. But that button resulted in a 500-error (white screen with text: Sorry, a server error has occurred (500))

I then created a partij using Postman:

  • Create Partij:
"interneNotitie": "Suzanne Moulin aangemaakt via Postman",
"digitaleAdressen": null,
"voorkeursDigitaalAdres": null,
"rekeningnummers": null,
"voorkeursRekeningnummer": null,
"soortPartij": "persoon",
"indicatieActief": true
}
  • With the uuid from the response: create partijidentficator:
{
    "identificeerdePartij": {
        "uuid": "3b23bd70-f18f-48e8-bb12-a3dad2caf035"
    },
    "partijIdentificator": {
        "codeObjecttype": "inp",
        "codeSoortObjectId": "bsn",
        "objectId": "999993653",
        "codeRegister": "brp"
    }
}

When I then tried to view the details of that partij in the Admin interface, I also get a 500-error.
NB: i see that the URL that gives the error is https://openklant24.dev.kiss-demo.nl/admin/klantinteracties/partij/2/change/, whereas the nummer of the Partij is 0000000001. I'm not sure if that might be relevant.

I created a second partij. And at this point I can see 2 Partijen in the Admin interface, on https://openklant24.dev.kiss-demo.nl/admin/klantinteracties/partij/
But when i click to view the details i get a 500 error.

And by now, when I click the "Partij toevoegen"-button, I also get a 500-error.

Stappen om te reproduceren / Steps to reproduce

No response

Verwacht gedrag / Expected behavior

No response

@sytskevanhasselt sytskevanhasselt added bug Something isn't working triage labels Dec 11, 2024
@sytskevanhasselt
Copy link
Author

Question: can I 'restore' the admin interface by deleting the two Partijen?

@swrichards
Copy link

For reference, I think what is going on here is that the admin does not enforce the presence of the corresponding partijIdentificatie when creating a Partij. Creating a bare Partij will 500, but you are able to create e.g. a persoon if you also add a Persoon object at creation time. It seems to me the admin/model validation should enforce that the Partij and appropriate partijIdentificatie are always created together.

@sytskevanhasselt
Copy link
Author

sytskevanhasselt commented Dec 12, 2024

Additional info: At this point the whole Partijen-interface of the Admin is broken in our installation:

  • I can't delete them: results in 500-error
  • I can't view/ edit them: results in 500-error
  • I can't add new partijen: clicking on Partij toevoegen results in 500 erro

I tried to delete them via Postman, but the response i get is:

{
    "type": "https://openklant24.dev.kiss-demo.nl/ref/fouten/MethodNotAllowed/",
    "code": "method_not_allowed",
    "title": "Methode \"{method}\" niet toegestaan.",
    "status": 405,
    "detail": "Methode \"DELETE\" niet toegestaan.",
    "instance": "urn:uuid:efa21a83-7037-4eb6-912b-68acaa1f3bbe"
}

So we are a little hampered in the admin interface ....

@mariusvandam
Copy link

@SonnyBA are you aware of this ticket and could you have a look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

3 participants