Self hosted FLOSS fitness/workout, nutrition and weight tracker
Cleanup unused variables
Roland Geiderc5d602fab870
diff --git a/pyproject.toml b/pyproject.tomlindex 27381184c..90d027f4b 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -157,7 +157,7 @@ select = [[tool.ruff.lint.per-file-ignores]# Import sorting was historically skipped for these (isort's "skip" list)-"**/migrations/*.py" = ["I", "F401"]+"**/migrations/*.py" = ["I", "F401", "E501"]"settings/*.py" = ["I"]"extras/**/*.py" = ["I"]"**/apps.py" = ["I"]diff --git a/wger/gallery/forms.py b/wger/gallery/forms.pyindex f7bfbaf91..f2d5e8e6f 100644--- a/wger/gallery/forms.py+++ b/wger/gallery/forms.py@@ -66,6 +66,6 @@ class ImageForm(ModelForm):date_str = exif_data.get(36867)if date_str:return datetime.strptime(date_str, '%Y:%m:%d %H:%M:%S').date()- except Exception as e:+ except Exception:passreturn Nonediff --git a/wger/manager/migrations/0019_flexible_routines_migration.py b/wger/manager/migrations/0019_flexible_routines_migration.pyindex af80ca7cd..b7eb8bf33 100644--- a/wger/manager/migrations/0019_flexible_routines_migration.py+++ b/wger/manager/migrations/0019_flexible_routines_migration.py@@ -26,7 +26,6 @@ def migrate_routines(apps) -> dict[int, Any]:WeightConfig = apps.get_model('manager', 'WeightConfig')RepetitionsConfig = apps.get_model('manager', 'RepetitionsConfig')RiRConfig = apps.get_model('manager', 'RiRConfig')- RestConfig = apps.get_model('manager', 'RestConfig')REPLACE_OP = 'r'ABS_STEP = 'abs'diff --git a/wger/utils/validators.py b/wger/utils/validators.pyindex 4a7de7a0b..3419144e8 100644--- a/wger/utils/validators.py+++ b/wger/utils/validators.py@@ -11,7 +11,7 @@ from wger.core.models import Languagedef validate_language_code(value):try:- language = Language.objects.get(short_name=value)+ Language.objects.get(short_name=value)except Language.DoesNotExist:raise ValidationError(f'The language "{value}" does not exist in this wger database.')