Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix bug preventing deletion of rep and weight units
Roland Geiderf48b6d955c24
diff --git a/docs/changelog.rst b/docs/changelog.rstindex be238529f..5649b08d7 100644--- a/docs/changelog.rst+++ b/docs/changelog.rst@@ -49,7 +49,7 @@ Upgrade steps from 1.9:* `#368`_, `#379`_, `#426`_ (thanks `@austin-leung`_), `#499`_, `#505`_, `#504`_,`#511`_, `#516`_, `#522`_, `#554`_ and `#560`_ (thanks `@sandilsranasinghe`_),`#564`_, `#565`_, `#615`_, `#560`_ (thanks `@bradsk88`_), `#617`_ (thanks `@Sidrah-Madiha`_),- `#636`_,+ `#636`_, `#640`_🧰 Maintenance:@@ -123,6 +123,7 @@ Upgrade steps from 1.9:.. _#617: https://github.com/wger-project/wger/issues/617.. _#631: https://github.com/wger-project/wger/issues/631.. _#636: https://github.com/wger-project/wger/issues/636+.. _#640: https://github.com/wger-project/wger/issues/640diff --git a/wger/core/views/repetition_units.py b/wger/core/views/repetition_units.pyindex dc6735a69..1d4bd8a23 100644--- a/wger/core/views/repetition_units.py+++ b/wger/core/views/repetition_units.py@@ -88,10 +88,11 @@ class UpdateView(WgerFormMixin, LoginRequiredMixin, PermissionRequiredMixin, Updclass DeleteView(WgerDeleteMixin, LoginRequiredMixin, PermissionRequiredMixin, DeleteView):"""- View to delete an existing license+ View to delete an existing setting unit"""model = RepetitionUnit+ fields = ['name']success_url = reverse_lazy('core:repetition-unit:list')permission_required = 'core.delete_repetitionunit'diff --git a/wger/core/views/weight_units.py b/wger/core/views/weight_units.pyindex 14821923e..5de816b9d 100644--- a/wger/core/views/weight_units.py+++ b/wger/core/views/weight_units.py@@ -88,10 +88,11 @@ class UpdateView(WgerFormMixin, LoginRequiredMixin, PermissionRequiredMixin, Updclass DeleteView(WgerDeleteMixin, LoginRequiredMixin, PermissionRequiredMixin, DeleteView):"""- View to delete an existing license+ View to delete an existing weight unit"""model = WeightUnit+ fields = ['name']success_url = reverse_lazy('core:weight-unit:list')permission_required = 'core.delete_weightunit'