uppsaladatavetare / foobar-api

The backend of the FooBar kiosk and inventory system.
MIT License
12 stars 6 forks source link

Ability to do manual stock-taking #17

Closed kjagiello closed 7 years ago

flaeppe commented 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?

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?

kjagiello commented 7 years ago

Nice catch! That's definitely a bug!