Browse Source

change subCategory assign

ilya_shyian 1 year ago
parent
commit
bc416e4f8a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      store_back/apps/categories/schema.py

+ 2 - 0
store_back/apps/categories/schema.py

@@ -154,6 +154,8 @@ class CategoryUpsert(graphene.Mutation):
         if len(subcategories_list):
             new_category.subcategories.set(subcategories_list)
 
+        new_category.save()
+
         category_data = model_to_dict(new_category)
         category_data["_id"] = new_category._id
         return CategoryType(**category_data)