Skip to content

Commit

Permalink
Move code before it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Oct 28, 2024
1 parent f1220e1 commit 6c10d94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/osha/oira/services/surveys.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
class ToolVersionsGet(Service):
"""Get info from the oira tool (survey group) and its versions (surveys)."""

@property
def default_image_url(self):
portal_url = api.portal.get().absolute_url()
return f"{portal_url}/++resource++osha.oira.content/clipboard.svg"

def get_survey_info(self, survey):
# Is this survey the tool version that is published on the client?
published_on_client = self.published_tool_version_id == survey.id
Expand Down Expand Up @@ -84,8 +89,3 @@ def reply(self):
result["image_url"] = self.default_image_url

return result

@property
def default_image_url(self):
portal_url = api.portal.get().absolute_url()
return f"{portal_url}/++resource++osha.oira.content/clipboard.svg"

0 comments on commit 6c10d94

Please sign in to comment.