Skip to content

Commit

Permalink
Merge branch 'feature/add-flag-to-configured-app' of https://github.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslinhares committed Jan 23, 2024
2 parents f34eb37 + 60727ca commit 5f5ae13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions marketplace/services/facebook/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ def create_vtex_catalog(self, validated_data, app, vtex_app, user):
"created_by": user,
}
catalog = self._create_catalog_object(data)
app.config["connected_catalog"] = True
app.save()
vtex_app.config["connected_catalog"] = True
vtex_app.save()
self._update_connected_catalog_flag(vtex_app)
return catalog, response.get("id")

return None, None
Expand Down Expand Up @@ -113,3 +110,7 @@ def _create_catalog_object(self, data):
name=data.get("name"),
created_by=data.get("created_by"),
)

def _update_connected_catalog_flag(self, app) -> None:
app.config["connected_catalog"] = True
app.save()

0 comments on commit 5f5ae13

Please sign in to comment.