Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
vegu committed Oct 7, 2024
1 parent 923dae8 commit 1ad9fc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/django_peeringdb/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/django_peeringdb/migrations/0034_fix_voltage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 1ad9fc0

Please sign in to comment.