fix migration datas

This commit is contained in:
Cayo Puigdefabregas 2022-06-01 13:14:45 +02:00
parent 96680937e9
commit b7eb438767
1 changed files with 4 additions and 4 deletions

View File

@ -41,10 +41,10 @@ def upgrade_datas():
code = ac.code
columns = '(id, user_from_id, user_to_id, lot_id, code)'
values = f'(\'{id}\', \'{user_from}\', \'{user_to}\', \'{lot}\', \'{code}\')'
if user_from not in phantoms:
if user_to not in phantoms:
columns = '(id, user_to_id, lot_id, code)'
values = f'(\'{id}\', \'{user_to}\', \'{lot}\', \'{code}\')'
if user_to not in phantoms:
if user_from not in phantoms:
columns = '(id, user_from_id, lot_id, code)'
values = f'(\'{id}\', \'{user_from}\', \'{lot}\', \'{code}\')'
new_transfer = f'insert into {get_inv()}.transfer {columns} values {values}'