# HG changeset patch # User Edouard Tisserant # Date 1543241538 -3600 # Node ID 89abeece2c71a6200b62e6eda489a474e3d976c3 # Parent 21164625b393cccac287adef8cceb163d8351c01 Fixed ID,last URI, or last connection date not being updated when connnecting to target. diff -r 21164625b393 -r 89abeece2c71 PSKManagement.py --- a/PSKManagement.py Fri Nov 23 12:13:24 2018 +0100 +++ b/PSKManagement.py Mon Nov 26 15:12:18 2018 +0100 @@ -81,11 +81,20 @@ # here we directly use _LoadData, avoiding filtering that could be long data = _LoadData(project_path) idata = _dataByID(data) - dataForID = idata.get(ID, _default(ID)) if data else _default(ID) + dataForID = idata.get(ID, None) if data else None + + _is_new_ID = dataForID is None + if _is_new_ID: + dataForID = _default(ID) + dataForID[COL_URI] = URI # FIXME : could store time instead os a string and use DVC model's cmp # then date display could be smarter, etc - sortable sting hack for now dataForID[COL_LAST] = time.strftime('%y/%M/%d-%H:%M:%S') + + if _is_new_ID: + data.append(dataForID) + SaveData(project_path, data) def ExportIDs(project_path, export_zip):