aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/category.py
blob: fef5ca81b4e4203aeef6407eff17bf3cbcce75b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from .abstract import AbstractController
from web.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