We should add methods in ews/models/patch.py allowing to save a Patch to database after performing necessary verification on input data.
Created attachment 355546 [details] Proposed patch
Comment on attachment 355546 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=355546&action=review lgtm, other than the refactor of patchid to patch_id. > Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:45 > + def save_patch(cls, patchid, bug_id=-1, obsolete=False): can we use patch_id instead of patchid ? > Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:63 > + if not patchid or type(patchid) != int or patchid < 0: rare edge case...but could we have a patchid of 0? maybe this should be "patchid < 1" ?
Comment on attachment 355546 [details] Proposed patch lgtm, other than the refactor of patchid to patch_id.
Comment on attachment 355546 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=355546&action=review >> Tools/BuildSlaveSupport/ews-app/ews/models/patch.py:45 >> + def save_patch(cls, patchid, bug_id=-1, obsolete=False): > > can we use patch_id instead of patchid ? ++
> can we use patch_id instead of patchid ? Sure, will use patch_id. > rare edge case...but could we have a patchid of 0? maybe this should be "patchid < 1" ? Sure, will change.
Committed r238529: <http://trac.webkit.org/changeset/238529>
<rdar://problem/46260973>