Project

General

Profile

0001-sql-add-evo.who-on-evolution-update-31472.patch

Thomas Noël, 17 Mar 2019 11:59 AM

Download (1.77 KB)

View differences:

Subject: [PATCH] sql: add evo.who on evolution update (#31472)

 tests/test_workflows.py | 3 ++-
 wcs/sql.py              | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
tests/test_workflows.py
675 675
        item2.perform(formdata)
676 676
        assert pub.user_class.get(user.id).roles == []
677 677

  
678
def test_anonymise(pub):
678
def test_anonymise(two_pubs):
679 679
    # build a backoffice field
680 680
    Workflow.wipe()
681 681
    wf = Workflow(name='wf with backoffice field')
......
718 718
                                                          'bo1': None,
719 719
                                                          'bo2': 'foo', 'bo2_display': 'foo'}
720 720
    assert formdef.data_class().get(formdata.id).workflow_data is None
721
    assert formdef.data_class().get(formdata.id).evolution[0].who is None
721 722

  
722 723
def test_remove(pub):
723 724
    formdef = FormDef()
wcs/sql.py
1372 1372
                if hasattr(evo, '_sql_id'):
1373 1373
                    sql_dict.update({'id': evo._sql_id})
1374 1374
                    sql_statement = '''UPDATE %s_evolutions SET
1375
                                        who = %%(who)s,
1375 1376
                                        time = %%(time)s,
1376 1377
                                        last_jump_datetime = %%(last_jump_datetime)s,
1377 1378
                                        status = %%(status)s,
1378
-