From 1ad9fc01201d7f43b3ff16efdff46067eb7171cd Mon Sep 17 00:00:00 2001 From: Stefan Pratter Date: Mon, 7 Oct 2024 11:18:43 +0000 Subject: [PATCH] linting --- src/django_peeringdb/fields.py | 1 - src/django_peeringdb/migrations/0034_fix_voltage.py | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/django_peeringdb/fields.py b/src/django_peeringdb/fields.py index 23a6e81..e542330 100644 --- a/src/django_peeringdb/fields.py +++ b/src/django_peeringdb/fields.py @@ -5,7 +5,6 @@ class MultipleChoiceField(models.CharField): - """ Field that can take a set of string values and store them in a charfield using a delimiter diff --git a/src/django_peeringdb/migrations/0034_fix_voltage.py b/src/django_peeringdb/migrations/0034_fix_voltage.py index 905daf9..fd1e3fc 100644 --- a/src/django_peeringdb/migrations/0034_fix_voltage.py +++ b/src/django_peeringdb/migrations/0034_fix_voltage.py @@ -22,9 +22,9 @@ def forward(apps, schema_editor): try: # overide from_db_value method # because this method calls "clean_choices" resulting in a validation error when retrieving all facilites. - Facility._meta.get_field( - "available_voltage_services" - ).from_db_value = _from_db_value + Facility._meta.get_field("available_voltage_services").from_db_value = ( + _from_db_value + ) facilities = Facility.handleref.all() for facility in facilities: voltage = facility.available_voltage_services @@ -42,9 +42,9 @@ def forward(apps, schema_editor): print(f"Removed {removed} from {facility}") facility.save() finally: - Facility._meta.get_field( - "available_voltage_services" - ).from_db_value = from_db_value + Facility._meta.get_field("available_voltage_services").from_db_value = ( + from_db_value + ) updated_field.auto_now = updated_field_auto_now