mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
feat: automatic product archiving
This commit is contained in:
1 parent
30fd4f6926
commit
83a4ac2a7e
6 files changed
+160
-15
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# Create your tasks here
|
||||
|
||||
from celery import shared_task
|
||||
|
||||
from counter.models import Product
|
||||
|
||||
|
||||
@shared_task
|
||||
def archive_product(product_id: int):
|
||||
product = Product.objects.get(id=product_id)
|
||||
product.archived = True
|
||||
product.save()
|
||||
Reference in new issue
Block a user