Closed kjagiello closed 7 years ago
When we assign a free stock take chunk(assign_free_stocktake_chunk(user_id, stocktake_id)), is a chunk_obj with an owner considered free?
assign_free_stocktake_chunk(user_id, stocktake_id)
Because now it seems that we can overwrite the owner_id of it, when someone is not finished yet.
owner_id
Wouldn't in that case this filter make more sense?: chunk_qs.filter(stocktake_id=stocktake_id, locked=False, owner__isnull=True)
chunk_qs.filter(stocktake_id=stocktake_id, locked=False, owner__isnull=True)
Or am I missing something?
Nice catch! That's definitely a bug!
When we assign a free stock take chunk(
assign_free_stocktake_chunk(user_id, stocktake_id)
), is a chunk_obj with an owner considered free?Because now it seems that we can overwrite the
owner_id
of it, when someone is not finished yet.Wouldn't in that case this filter make more sense?:
chunk_qs.filter(stocktake_id=stocktake_id, locked=False, owner__isnull=True)
Or am I missing something?