-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/310 validation nummeraanduidingid #315
base: master
Are you sure you want to change the base?
Feature/310 validation nummeraanduidingid #315
Conversation
@@ -0,0 +1,99 @@ | |||
# Generated by Django 4.2.15 on 2025-01-09 09:22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test for this migration?
Something like
class TestTokenAuthUniqueness(BaseMigrationTest): |
|
||
organisatie_queryset = Organisatie.objects.annotate( | ||
length=Length("adres_nummeraanduiding_id") | ||
).filter(length__gt=16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also include the entries that have length less than 16, because those wouldn't pass validation either
@@ -0,0 +1,133 @@ | |||
# Generated by Django 4.2.15 on 2025-01-09 09:22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a test for this migration?
betrokkene_queryset = Betrokkene.objects.annotate( | ||
length1=Length("bezoekadres_nummeraanduiding_id"), | ||
length2=Length("correspondentieadres_nummeraanduiding_id"), | ||
).filter(models.Q(length1__gt=16) | models.Q(length2__gt=16)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as in the other migration, this should include entries with <16 chars too I think
Fixes #310
bag_id
-> (length=16 and only digits
)