From 032bc3dc0d8fd195d7850cb984887abf721fa60c Mon Sep 17 00:00:00 2001 From: John Thomas Date: Mon, 9 Mar 2020 15:07:43 -0700 Subject: [PATCH] Change Order of operations in project.setup --- labelbox/schema/project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/labelbox/schema/project.py b/labelbox/schema/project.py index c9bb660aa..14a492472 100644 --- a/labelbox/schema/project.py +++ b/labelbox/schema/project.py @@ -199,6 +199,8 @@ def setup(self, labeling_frontend, labeling_frontend_options): if not isinstance(labeling_frontend_options, str): labeling_frontend_options = json.dumps(labeling_frontend_options) + self.labeling_frontend.connect(labeling_frontend) + LFO = Entity.LabelingFrontendOptions labeling_frontend_options = self.client._create( LFO, {LFO.project: self, LFO.labeling_frontend: labeling_frontend, @@ -206,7 +208,6 @@ def setup(self, labeling_frontend, labeling_frontend_options): LFO.organization: organization }) - self.labeling_frontend.connect(labeling_frontend) timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") self.update(setup_complete=timestamp)