Skip to content

Commit

Permalink
handle name for plugins with no organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverb123 committed Jul 24, 2024
1 parent 716710b commit 05aa95a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion posthog/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ def get_latest_tag(self, plugin: Plugin) -> Optional[str]:
return None

def get_organization_name(self, plugin: Plugin) -> str:
return plugin.organization.name
if plugin.organization:
return plugin.organization.name
else:
return "posthog-inline"

def create(self, validated_data: dict, *args: Any, **kwargs: Any) -> Plugin:
validated_data["url"] = self.initial_data.get("url", None)
Expand Down

0 comments on commit 05aa95a

Please sign in to comment.