Merge ~twom/launchpad:oci-recipe-setter-ordering into launchpad:master

Proposed by Tom Wardill
Status: Merged
Approved by: Tom Wardill
Approved revision: ee40e88c798cca8adda82552d2f02d9870745cc6
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~twom/launchpad:oci-recipe-setter-ordering
Merge into: launchpad:master
Diff against target: 14 lines (+1/-1)
1 file modified
lib/lp/oci/model/ocirecipe.py (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+380046@code.launchpad.net

Commit message

Swap order of setter lines for DB safeness

Description of the change

Setting the git_path before the git_repository didn't satisfy the DB constraint.
Swap the order and everything (related to that) is happy.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
2index 2bf8068..99593a3 100644
3--- a/lib/lp/oci/model/ocirecipe.py
4+++ b/lib/lp/oci/model/ocirecipe.py
5@@ -152,8 +152,8 @@ class OCIRecipe(Storm):
6 def git_ref(self, value):
7 """See `IOCIRecipe`."""
8 if value is not None:
9- self.git_path = value.path
10 self.git_repository = value.repository
11+ self.git_path = value.path
12 else:
13 self.git_repository = None
14 self.git_path = None

Subscribers

People subscribed via source and target branches

to status/vote changes: