mirror of
https://github.com/ae-utbm/sith.git
synced 2025-09-14 03:55:50 +00:00
14 lines
266 B
Python
14 lines
266 B
Python
# Create your tasks here
|
|
|
|
from celery import shared_task
|
|
|
|
from counter.models import Product
|
|
|
|
|
|
@shared_task
|
|
def archive_product(product_id):
|
|
product = Product.objects.get(id=product_id)
|
|
product.archived = True
|
|
product.save()
|
|
product.counters.clear()
|