aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/controllers')
-rw-r--r--pyaggr3g470r/controllers/category.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyaggr3g470r/controllers/category.py b/pyaggr3g470r/controllers/category.py
index b6fc591c..a0f746e9 100644
--- a/pyaggr3g470r/controllers/category.py
+++ b/pyaggr3g470r/controllers/category.py
@@ -1,6 +1,12 @@
from .abstract import AbstractController
from pyaggr3g470r.models import Category
+from .feed import FeedController
class CategoryController(AbstractController):
_db_cls = Category
+
+ def delete(self, obj_id):
+ FeedController(self.user_id).update({'category_id': obj_id},
+ {'category_id': None})
+ return super().delete(obj_id)
bgstack15