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

Conversation

zachaysan
Copy link
Contributor

Changes

This enables allowing licences without having to check the is_enterprise function.

How did you test this code?

Simple change. Did not test.

@zachaysan zachaysan requested a review from a team as a code owner January 9, 2025 15:20
@zachaysan zachaysan requested review from khvn26 and removed request for a team January 9, 2025 15:20
Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jan 9, 2025 3:20pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Jan 9, 2025 3:20pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Jan 9, 2025 3:20pm

@github-actions github-actions bot added api Issue related to the REST API fix labels Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4984 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-4984 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-4984 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-4984 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4984 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4984 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Uffizzi Preview deployment-59714 was deleted.

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.39%. Comparing base (2fe4e02) to head (5e33423).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4984   +/-   ##
=======================================
  Coverage   97.39%   97.39%           
=======================================
  Files        1191     1191           
  Lines       41630    41630           
=======================================
  Hits        40546    40546           
  Misses       1084     1084           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

@zachaysan zachaysan closed this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants