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

Allow Studio URLs to be created as network locations #13044

Conversation

nucleogenesis
Copy link
Member

@nucleogenesis nucleogenesis commented Jan 30, 2025

Summary

  • Adds regression test that would trigger the same error preventing hotfixes/studio urls to be used as network locations
  • Fixes the error by adding conditional to NetworkLocation#save that ensures operating_system is not None

References

Fixes #12912

Reviewer guidance

  • Add studio.learningequality.org to your list of locations to import content from
  • Restart your server
  • You should see that URL is not disabled, no errors.

Note that during startup, the connections are updated there as well, so when you restart the server, you should also see no IntegrityErrors.

@github-actions github-actions bot added the DEV: backend Python, databases, networking, filesystem... label Jan 30, 2025
…rror

The request to the remote server can return a value where
`operating_system` is None - we then try to save that, resulting
in an IntegrityError - these tests are made to validate the
solution to follow
@nucleogenesis nucleogenesis force-pushed the 12912-018-select-device-modal-disabled-server-address branch from 79f941b to 11ba3fa Compare January 30, 2025 21:57
@nucleogenesis nucleogenesis marked this pull request as ready for review January 30, 2025 22:10
@nucleogenesis nucleogenesis force-pushed the 12912-018-select-device-modal-disabled-server-address branch from 11ba3fa to 6977a3d Compare January 30, 2025 23:57
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Tested the regression test locally without the fix applies, and it perfectly replicates the error scenario. Production code update resolves the issue.

@rtibbles rtibbles merged commit 0470a0e into learningequality:develop Jan 31, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.18 - 'Select device' modal - Disabled server address
2 participants