Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove is_enterprise check #4984

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions api/organisations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,7 @@ def _get_subscription_metadata_for_chargebee(self) -> ChargebeeObjMetadata:
return cb_metadata

def _get_subscription_metadata_for_self_hosted(self) -> BaseSubscriptionMetadata:
if is_enterprise() and hasattr(
self.organisation, "licence"
): # pragma: no cover
if hasattr(self.organisation, "licence"): # pragma: no cover
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm super confused now. The is_enterprise() function is unrelated to the data in the database - it is just checking whether the image that's being used is the enterprise version.

This change will not resolve the issue highlighted by @rolodato here (if indeed it is an issue, or maybe this whole thing was just a miscommunication?).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this was a whole chain of miscommunication. The steps @rolodato outlined were a miscommunication by me since I thought that the is_enterprise() check hit the database and mentioned it to him.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'm going to close this PR now, since we want to keep the is_enterprise() check.

licence_information = self.organisation.licence.get_licence_information()
return BaseSubscriptionMetadata(
seats=licence_information.num_seats,
Expand Down
Loading