-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor logging, move logic from DocumentDeleteView.delete() to form_valid() * normalize data structure and correct type annotation in `InboxView` (confusion between queryset and list) * refactor logging in the context of DigiD user change/creation since db logging caused `ValueError: save() prohibited to prevent data loss due to unsaved related object 'content_object'`
- Loading branch information
Showing
25 changed files
with
164 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/open_inwoner/accounts/migrations/0073_alter_user_user_contacts.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.10 on 2024-02-13 13:58 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("accounts", "0072_merge_20240129_1610"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="user", | ||
name="user_contacts", | ||
field=models.ManyToManyField( | ||
blank=True, | ||
help_text="The contacts of the specific user", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Contacts", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/open_inwoner/cms/banner/migrations/0004_alter_bannerimage_cmsplugin_ptr_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generated by Django 4.2.10 on 2024-02-13 13:58 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("cms", "0022_auto_20180620_1551"), | ||
("banner", "0003_auto_20230511_1125"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="bannerimage", | ||
name="cmsplugin_ptr", | ||
field=models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
related_name="%(app_label)s_%(class)s", | ||
serialize=False, | ||
to="cms.cmsplugin", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="bannertext", | ||
name="cmsplugin_ptr", | ||
field=models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
related_name="%(app_label)s_%(class)s", | ||
serialize=False, | ||
to="cms.cmsplugin", | ||
), | ||
), | ||
] |
41 changes: 41 additions & 0 deletions
41
src/open_inwoner/cms/plugins/migrations/0004_alter_userfeed_cmsplugin_ptr_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generated by Django 4.2.10 on 2024-02-13 13:58 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("cms", "0022_auto_20180620_1551"), | ||
("plugins", "0003_userfeed_title"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="userfeed", | ||
name="cmsplugin_ptr", | ||
field=models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
related_name="%(app_label)s_%(class)s", | ||
serialize=False, | ||
to="cms.cmsplugin", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="videoplayer", | ||
name="cmsplugin_ptr", | ||
field=models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
related_name="%(app_label)s_%(class)s", | ||
serialize=False, | ||
to="cms.cmsplugin", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
from django.core.management import call_command | ||
from django.test import TestCase | ||
|
||
from django_yubin.constants import RESULT_FAILED | ||
from django_yubin.models import Log, Message | ||
from freezegun import freeze_time | ||
|
||
|
@@ -20,11 +19,8 @@ def test_no_recipients_configured(self): | |
subject="Some subject", | ||
from_address="[email protected]", | ||
to_address="[email protected]", | ||
encoded_message="foo", | ||
) | ||
Log.objects.create( | ||
message=message, result=RESULT_FAILED, log_message="Some " | ||
) | ||
Log.objects.create(message=message, log_message="Some ") | ||
|
||
with freeze_time("2024-01-02T00:00:00"): | ||
call_command("send_failed_mail_digest") | ||
|
@@ -41,11 +37,8 @@ def test_no_failing_emails_in_past_24_hours(self): | |
subject="Some subject", | ||
from_address="[email protected]", | ||
to_address="[email protected]", | ||
encoded_message="foo", | ||
) | ||
Log.objects.create( | ||
message=message, result=RESULT_FAILED, log_message="Some msg" | ||
) | ||
Log.objects.create(message=message, log_message="Some msg") | ||
|
||
with freeze_time("2024-01-02T00:00:00"): | ||
call_command("send_failed_mail_digest") | ||
|
@@ -62,22 +55,16 @@ def test_send_daily_failing_email_digest(self): | |
subject="Should not show up in email", | ||
from_address="[email protected]", | ||
to_address="[email protected]", | ||
encoded_message="foo", | ||
) | ||
Log.objects.create( | ||
message=message, result=RESULT_FAILED, log_message="Some msg" | ||
) | ||
Log.objects.create(message=message, log_message="Some msg") | ||
|
||
with freeze_time("2024-01-01T12:00:00"): | ||
message = Message.objects.create( | ||
subject="Should show up in email", | ||
from_address="[email protected]", | ||
to_address="[email protected]", | ||
encoded_message="bar", | ||
) | ||
Log.objects.create( | ||
message=message, result=RESULT_FAILED, log_message="Some msg" | ||
) | ||
Log.objects.create(message=message, log_message="Some msg") | ||
|
||
with freeze_time("2024-01-02T00:00:00"): | ||
call_command("send_failed_mail_digest") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.