Skip to content

Commit

Permalink
fix: Variable organization in Model URL (#293)
Browse files Browse the repository at this point in the history
The Mode dashboard URL should change based on organization name passed in the config.
  • Loading branch information
arjunlandes authored Jun 17, 2020
1 parent de2a9e1 commit b4c24ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ def init(self, conf):
dashboard_group_url_transformer.init(
conf=Scoped.get_scoped_conf(self._conf, dashboard_group_url_transformer.get_scope()).with_fallback(
ConfigFactory.from_dict({VAR_FIELD_NAME: 'dashboard_group_url',
TEMPLATE: 'https://app.mode.com/lyft/spaces/{dashboard_group_id}'})))
TEMPLATE: 'https://app.mode.com/{organization}/spaces/{dashboard_group_id}'})))

transformers.append(dashboard_group_url_transformer)

dashboard_url_transformer = TemplateVariableSubstitutionTransformer()
dashboard_url_transformer.init(
conf=Scoped.get_scoped_conf(self._conf, dashboard_url_transformer.get_scope()).with_fallback(
ConfigFactory.from_dict({VAR_FIELD_NAME: 'dashboard_url',
TEMPLATE: 'https://app.mode.com/lyft/reports/{dashboard_id}'})))
TEMPLATE: 'https://app.mode.com/{organization}/reports/{dashboard_id}'})))
transformers.append(dashboard_url_transformer)

dict_to_model_transformer = DictToModel()
Expand Down

0 comments on commit b4c24ef

Please sign in to comment.