diff --git a/src/objects/accounts/migrations/0001_initial.py b/src/objects/accounts/migrations/0001_initial.py index a52df171..81d040b9 100644 --- a/src/objects/accounts/migrations/0001_initial.py +++ b/src/objects/accounts/migrations/0001_initial.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/objects/accounts/migrations/0002_auto_20201012_1522.py b/src/objects/accounts/migrations/0002_auto_20201012_1522.py index c5d0129c..d0143243 100644 --- a/src/objects/accounts/migrations/0002_auto_20201012_1522.py +++ b/src/objects/accounts/migrations/0002_auto_20201012_1522.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0001_initial"), ] diff --git a/src/objects/accounts/migrations/0003_auto_20201223_1231.py b/src/objects/accounts/migrations/0003_auto_20201223_1231.py index 1f25cccf..c9964d50 100644 --- a/src/objects/accounts/migrations/0003_auto_20201223_1231.py +++ b/src/objects/accounts/migrations/0003_auto_20201223_1231.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0002_auto_20201012_1522"), ] diff --git a/src/objects/api/validators.py b/src/objects/api/validators.py index b54859b6..a1f44ab7 100644 --- a/src/objects/api/validators.py +++ b/src/objects/api/validators.py @@ -116,7 +116,6 @@ def __call__(self, attrs): try: response = client.retrieve("objecttype", url=object_type.url) except ClientError as exc: - msg = f"Object type can not be retrieved: {exc.args[0]}" raise ValidationError(msg) diff --git a/src/objects/core/migrations/0001_initial.py b/src/objects/core/migrations/0001_initial.py index 9d5d1d7e..dd093ccf 100644 --- a/src/objects/core/migrations/0001_initial.py +++ b/src/objects/core/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/src/objects/core/migrations/0002_auto_20200518_1707.py b/src/objects/core/migrations/0002_auto_20200518_1707.py index 2cd939d0..51423efc 100644 --- a/src/objects/core/migrations/0002_auto_20200518_1707.py +++ b/src/objects/core/migrations/0002_auto_20200518_1707.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0001_initial"), ] diff --git a/src/objects/core/migrations/0003_objectrecord.py b/src/objects/core/migrations/0003_objectrecord.py index 547aff24..7093cc35 100644 --- a/src/objects/core/migrations/0003_objectrecord.py +++ b/src/objects/core/migrations/0003_objectrecord.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0002_auto_20200518_1707"), ] diff --git a/src/objects/core/migrations/0004_move_data_to_record.py b/src/objects/core/migrations/0004_move_data_to_record.py index 73346b77..86f38237 100644 --- a/src/objects/core/migrations/0004_move_data_to_record.py +++ b/src/objects/core/migrations/0004_move_data_to_record.py @@ -22,7 +22,6 @@ def move_data_from_record(apps, _): class Migration(migrations.Migration): - dependencies = [ ("core", "0003_objectrecord"), ] diff --git a/src/objects/core/migrations/0005_remove_object_data.py b/src/objects/core/migrations/0005_remove_object_data.py index c8b5c02f..e4394895 100644 --- a/src/objects/core/migrations/0005_remove_object_data.py +++ b/src/objects/core/migrations/0005_remove_object_data.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0004_move_data_to_record"), ] diff --git a/src/objects/core/migrations/0006_auto_20200904_1402.py b/src/objects/core/migrations/0006_auto_20200904_1402.py index 827feb3c..076d8cb4 100644 --- a/src/objects/core/migrations/0006_auto_20200904_1402.py +++ b/src/objects/core/migrations/0006_auto_20200904_1402.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0005_remove_object_data"), ] diff --git a/src/objects/core/migrations/0007_auto_20200904_1403.py b/src/objects/core/migrations/0007_auto_20200904_1403.py index ec1abae2..8b49d5c2 100644 --- a/src/objects/core/migrations/0007_auto_20200904_1403.py +++ b/src/objects/core/migrations/0007_auto_20200904_1403.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0006_auto_20200904_1402"), ] diff --git a/src/objects/core/migrations/0008_objectrecord_correct.py b/src/objects/core/migrations/0008_objectrecord_correct.py index 988a7c87..32d4ece2 100644 --- a/src/objects/core/migrations/0008_objectrecord_correct.py +++ b/src/objects/core/migrations/0008_objectrecord_correct.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0007_auto_20200904_1403"), ] diff --git a/src/objects/core/migrations/0009_objectrecord_version.py b/src/objects/core/migrations/0009_objectrecord_version.py index d0d92625..1a5de1ef 100644 --- a/src/objects/core/migrations/0009_objectrecord_version.py +++ b/src/objects/core/migrations/0009_objectrecord_version.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0008_objectrecord_correct"), ] diff --git a/src/objects/core/migrations/0010_move_version_to_record.py b/src/objects/core/migrations/0010_move_version_to_record.py index f29c6e04..ad07bec6 100644 --- a/src/objects/core/migrations/0010_move_version_to_record.py +++ b/src/objects/core/migrations/0010_move_version_to_record.py @@ -19,7 +19,6 @@ def move_version_from_record(apps, _): class Migration(migrations.Migration): - dependencies = [ ("core", "0009_objectrecord_version"), ] diff --git a/src/objects/core/migrations/0011_remove_object_version.py b/src/objects/core/migrations/0011_remove_object_version.py index 47bbd2df..c851dc6e 100644 --- a/src/objects/core/migrations/0011_remove_object_version.py +++ b/src/objects/core/migrations/0011_remove_object_version.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0010_move_version_to_record"), ] diff --git a/src/objects/core/migrations/0012_objectrecord_uuid.py b/src/objects/core/migrations/0012_objectrecord_uuid.py index 2931f6d8..25da3346 100644 --- a/src/objects/core/migrations/0012_objectrecord_uuid.py +++ b/src/objects/core/migrations/0012_objectrecord_uuid.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0011_remove_object_version"), ] diff --git a/src/objects/core/migrations/0013_generate_record_uuids.py b/src/objects/core/migrations/0013_generate_record_uuids.py index 04263208..5296b18b 100644 --- a/src/objects/core/migrations/0013_generate_record_uuids.py +++ b/src/objects/core/migrations/0013_generate_record_uuids.py @@ -11,7 +11,6 @@ def generate_record_uuids(apps, _): class Migration(migrations.Migration): - dependencies = [ ("core", "0012_objectrecord_uuid"), ] diff --git a/src/objects/core/migrations/0014_auto_20200915_1740.py b/src/objects/core/migrations/0014_auto_20200915_1740.py index 1e0afa73..079f8bff 100644 --- a/src/objects/core/migrations/0014_auto_20200915_1740.py +++ b/src/objects/core/migrations/0014_auto_20200915_1740.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0013_generate_record_uuids"), ] diff --git a/src/objects/core/migrations/0015_objectrecord_geometry.py b/src/objects/core/migrations/0015_objectrecord_geometry.py index bd4dc1c2..505a234f 100644 --- a/src/objects/core/migrations/0015_objectrecord_geometry.py +++ b/src/objects/core/migrations/0015_objectrecord_geometry.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0014_auto_20200915_1740"), ] diff --git a/src/objects/core/migrations/0016_auto_20210111_1649.py b/src/objects/core/migrations/0016_auto_20210111_1649.py index a5e4b4a5..64431059 100644 --- a/src/objects/core/migrations/0016_auto_20210111_1649.py +++ b/src/objects/core/migrations/0016_auto_20210111_1649.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0015_objectrecord_geometry"), ] diff --git a/src/objects/core/migrations/0017_auto_20210111_1653.py b/src/objects/core/migrations/0017_auto_20210111_1653.py index d43b3581..48f4062b 100644 --- a/src/objects/core/migrations/0017_auto_20210111_1653.py +++ b/src/objects/core/migrations/0017_auto_20210111_1653.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0016_auto_20210111_1649"), ] diff --git a/src/objects/core/migrations/0018_auto_20210113_1239.py b/src/objects/core/migrations/0018_auto_20210113_1239.py index 566c5a62..61937575 100644 --- a/src/objects/core/migrations/0018_auto_20210113_1239.py +++ b/src/objects/core/migrations/0018_auto_20210113_1239.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0017_auto_20210111_1653"), ] diff --git a/src/objects/core/migrations/0019_fill_record_index.py b/src/objects/core/migrations/0019_fill_record_index.py index 059a9604..8823d303 100644 --- a/src/objects/core/migrations/0019_fill_record_index.py +++ b/src/objects/core/migrations/0019_fill_record_index.py @@ -22,7 +22,6 @@ def fill_record_index(apps, _): class Migration(migrations.Migration): - dependencies = [ ("core", "0018_auto_20210113_1239"), ] diff --git a/src/objects/core/migrations/0020_auto_20210118_1117.py b/src/objects/core/migrations/0020_auto_20210118_1117.py index b54d7677..12b2cd4f 100644 --- a/src/objects/core/migrations/0020_auto_20210118_1117.py +++ b/src/objects/core/migrations/0020_auto_20210118_1117.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0019_fill_record_index"), ] diff --git a/src/objects/core/migrations/0021_auto_20201222_1745.py b/src/objects/core/migrations/0021_auto_20201222_1745.py index 21b3edad..5638ada9 100644 --- a/src/objects/core/migrations/0021_auto_20201222_1745.py +++ b/src/objects/core/migrations/0021_auto_20201222_1745.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0011_remove_service_extra"), ("core", "0020_auto_20210118_1117"), diff --git a/src/objects/core/migrations/0022_move_object_types_to_separate_model.py b/src/objects/core/migrations/0022_move_object_types_to_separate_model.py index a5f2e5c8..030504c3 100644 --- a/src/objects/core/migrations/0022_move_object_types_to_separate_model.py +++ b/src/objects/core/migrations/0022_move_object_types_to_separate_model.py @@ -68,7 +68,6 @@ def move_objecttypes_from_model(apps, _): class Migration(migrations.Migration): - dependencies = [ ("core", "0021_auto_20201222_1745"), ("zgw_consumers", "0011_remove_service_extra"), diff --git a/src/objects/core/migrations/0023_remove_object_object_type.py b/src/objects/core/migrations/0023_remove_object_object_type.py index 68a16dc8..e03dbf69 100644 --- a/src/objects/core/migrations/0023_remove_object_object_type.py +++ b/src/objects/core/migrations/0023_remove_object_object_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0022_move_object_types_to_separate_model"), ] diff --git a/src/objects/core/migrations/0024_auto_20201222_1811.py b/src/objects/core/migrations/0024_auto_20201222_1811.py index 2247ae8d..3485dad7 100644 --- a/src/objects/core/migrations/0024_auto_20201222_1811.py +++ b/src/objects/core/migrations/0024_auto_20201222_1811.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0023_remove_object_object_type"), ] diff --git a/src/objects/core/migrations/0025_delete_objects_with_empty_object_type.py b/src/objects/core/migrations/0025_delete_objects_with_empty_object_type.py index 149a867b..9a16a265 100644 --- a/src/objects/core/migrations/0025_delete_objects_with_empty_object_type.py +++ b/src/objects/core/migrations/0025_delete_objects_with_empty_object_type.py @@ -8,7 +8,6 @@ def remove_objects_with_empty_object_type(apps, _): class Migration(migrations.Migration): - dependencies = [ ("core", "0024_auto_20201222_1811"), ] diff --git a/src/objects/core/migrations/0026_auto_20201222_1833.py b/src/objects/core/migrations/0026_auto_20201222_1833.py index 58be7238..ae8e289b 100644 --- a/src/objects/core/migrations/0026_auto_20201222_1833.py +++ b/src/objects/core/migrations/0026_auto_20201222_1833.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0025_delete_objects_with_empty_object_type"), ] diff --git a/src/objects/core/migrations/0027_auto_20211203_1209.py b/src/objects/core/migrations/0027_auto_20211203_1209.py index c488d33c..d8f5b7b4 100644 --- a/src/objects/core/migrations/0027_auto_20211203_1209.py +++ b/src/objects/core/migrations/0027_auto_20211203_1209.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0026_auto_20201222_1833"), ] diff --git a/src/objects/core/migrations/0028_auto_20230519_1201.py b/src/objects/core/migrations/0028_auto_20230519_1201.py index 034fc490..e307f1de 100644 --- a/src/objects/core/migrations/0028_auto_20230519_1201.py +++ b/src/objects/core/migrations/0028_auto_20230519_1201.py @@ -4,15 +4,18 @@ class Migration(migrations.Migration): - dependencies = [ - ('core', '0027_auto_20211203_1209'), + ("core", "0027_auto_20211203_1209"), ] operations = [ migrations.AlterField( - model_name='objecttype', - name='_name', - field=models.CharField(help_text='Cached name of the objecttype retrieved from the Objecttype API', max_length=100, unique=True), + model_name="objecttype", + name="_name", + field=models.CharField( + help_text="Cached name of the objecttype retrieved from the Objecttype API", + max_length=100, + unique=True, + ), ), ] diff --git a/src/objects/core/models.py b/src/objects/core/models.py index 6a0c45ae..8c421e06 100644 --- a/src/objects/core/models.py +++ b/src/objects/core/models.py @@ -25,7 +25,8 @@ class ObjectType(models.Model): ) _name = models.CharField( max_length=100, - help_text=_("Cached name of the objecttype retrieved from the Objecttype API"), unique=True + help_text=_("Cached name of the objecttype retrieved from the Objecttype API"), + unique=True, ) objects = ObjectTypeQuerySet.as_manager() diff --git a/src/objects/core/tests/test_models.py b/src/objects/core/tests/test_models.py index d46530f8..b1f03411 100644 --- a/src/objects/core/tests/test_models.py +++ b/src/objects/core/tests/test_models.py @@ -1,9 +1,11 @@ -from .factories import ObjectTypeFactory -from django.test import TestCase from django.db import IntegrityError +from django.test import TestCase + +from .factories import ObjectTypeFactory + class ObjectTypeTest(TestCase): def test_duplicate_name(self): ObjectTypeFactory.create(_name="test") with self.assertRaises(IntegrityError): - ObjectTypeFactory.create(_name="test") \ No newline at end of file + ObjectTypeFactory.create(_name="test") diff --git a/src/objects/core/utils.py b/src/objects/core/utils.py index 6f09a0ff..710ae7d1 100644 --- a/src/objects/core/utils.py +++ b/src/objects/core/utils.py @@ -11,7 +11,6 @@ def check_objecttype(object_type, version, data): try: response = client.retrieve("objectversion", url=objecttype_version_url) except ClientError as exc: - msg = f"Object type version can not be retrieved: {exc.args[0]}" raise ValidationError(msg) diff --git a/src/objects/token/migrations/0001_initial.py b/src/objects/token/migrations/0001_initial.py index d095e911..c9f955c0 100644 --- a/src/objects/token/migrations/0001_initial.py +++ b/src/objects/token/migrations/0001_initial.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/src/objects/token/migrations/0002_auto_20201223_1231.py b/src/objects/token/migrations/0002_auto_20201223_1231.py index c3fb8427..4affa4b0 100644 --- a/src/objects/token/migrations/0002_auto_20201223_1231.py +++ b/src/objects/token/migrations/0002_auto_20201223_1231.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0026_auto_20201222_1833"), ("token", "0001_initial"), diff --git a/src/objects/token/migrations/0003_auto_20210312_1507.py b/src/objects/token/migrations/0003_auto_20210312_1507.py index 8fd50617..4da71fb2 100644 --- a/src/objects/token/migrations/0003_auto_20210312_1507.py +++ b/src/objects/token/migrations/0003_auto_20210312_1507.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("token", "0002_auto_20201223_1231"), ] diff --git a/src/objects/token/migrations/0004_auto_20210315_1537.py b/src/objects/token/migrations/0004_auto_20210315_1537.py index 23a03d5d..d9d38e19 100644 --- a/src/objects/token/migrations/0004_auto_20210315_1537.py +++ b/src/objects/token/migrations/0004_auto_20210315_1537.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("token", "0003_auto_20210312_1507"), ] diff --git a/src/objects/token/migrations/0005_auto_20210623_1242.py b/src/objects/token/migrations/0005_auto_20210623_1242.py index f65c39ae..b7a54a20 100644 --- a/src/objects/token/migrations/0005_auto_20210623_1242.py +++ b/src/objects/token/migrations/0005_auto_20210623_1242.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("token", "0004_auto_20210315_1537"), ] diff --git a/src/objects/token/migrations/0006_auto_20210721_1543.py b/src/objects/token/migrations/0006_auto_20210721_1543.py index c7d609d0..8ee32af9 100644 --- a/src/objects/token/migrations/0006_auto_20210721_1543.py +++ b/src/objects/token/migrations/0006_auto_20210721_1543.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("core", "0026_auto_20201222_1833"), ("token", "0005_auto_20210623_1242"), diff --git a/src/objects/token/migrations/0007_remove_permission_fields.py b/src/objects/token/migrations/0007_remove_permission_fields.py index ab9394c3..07428a01 100644 --- a/src/objects/token/migrations/0007_remove_permission_fields.py +++ b/src/objects/token/migrations/0007_remove_permission_fields.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("token", "0006_auto_20210721_1543"), ] diff --git a/src/objects/token/migrations/0008_permission_fields.py b/src/objects/token/migrations/0008_permission_fields.py index 2a224f1f..d4d14761 100644 --- a/src/objects/token/migrations/0008_permission_fields.py +++ b/src/objects/token/migrations/0008_permission_fields.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("token", "0007_remove_permission_fields"), ] diff --git a/src/objects/utils/migration_operations.py b/src/objects/utils/migration_operations.py index 6633cfc1..ba82e50e 100644 --- a/src/objects/utils/migration_operations.py +++ b/src/objects/utils/migration_operations.py @@ -45,7 +45,6 @@ def database_forwards(self, app_label, schema_editor, from_state, to_state) -> N if router.allow_migrate( schema_editor.connection.alias, app_label, **self.hints ): - base_sql = _get_reset_sql() with schema_editor.connection.cursor() as cursor: