Allow resetting choice packs
This commit is contained in:
parent
92ba5129a1
commit
3fa7e47880
@ -218,11 +218,20 @@ async def patch_pack(
|
||||
if pack_type_id is not None:
|
||||
this_pack.pack_type_id = pack_type_id
|
||||
if pack_team_id is not None:
|
||||
this_pack.pack_team_id = pack_team_id
|
||||
if pack_team_id < 0:
|
||||
this_pack.pack_team_id = None
|
||||
else:
|
||||
this_pack.pack_team_id = pack_team_id
|
||||
if pack_cardset_id is not None:
|
||||
this_pack.pack_cardset_id = pack_cardset_id
|
||||
if pack_cardset_id < 0:
|
||||
this_pack.pack_cardset_id = None
|
||||
else:
|
||||
this_pack.pack_cardset_id = pack_cardset_id
|
||||
if open_time is not None:
|
||||
this_pack.open_time = open_time
|
||||
if open_time < 0:
|
||||
this_pack.open_time = None
|
||||
else:
|
||||
this_pack.open_time = open_time
|
||||
|
||||
if this_pack.save() == 1:
|
||||
return_val = model_to_dict(this_pack)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user