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

Add runpython script to add missing default fields #4581

Conversation

JacquelineMorrissette
Copy link
Contributor

Checklist

  1. If you've added code that should be tested, add tests
  2. If you've changed APIs, update (or create!) the documentation
  3. Ensure the tests pass
  4. Make sure that your code lints and that you've followed our coding style
  5. Write a description of your work suitable for publishing on our forum
  6. Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
  7. Open an issue in the docs if there are UI/UX changes

Description

Add a RunPython script to add the missing full_name and description to Constance USER_METADATA_FIELDS and PROJECT_METADATA_FIELDS if the fields are missing

@JacquelineMorrissette
Copy link
Contributor Author

@noliveleger I'm not sure what's going on with the tests, everything is passing locally but all tests in github have errors

hub/migrations/0012_alter_constance_config.py Outdated Show resolved Hide resolved
hub/migrations/0012_alter_constance_config.py Show resolved Hide resolved
hub/migrations/0012_alter_constance_config.py Outdated Show resolved Hide resolved
hub/migrations/0012_alter_constance_config.py Outdated Show resolved Hide resolved
hub/migrations/0012_alter_constance_config.py Outdated Show resolved Hide resolved
@noliveleger
Copy link
Contributor

noliveleger commented Aug 14, 2023

@noliveleger I'm not sure what's going on with the tests, everything is passing locally but all tests in github have errors

@JacquelineMorrissette , I guess your branch is not up-to-date locally and you did not bring latest changes of the parent branch (feature/user-project-metadata) in your branch.
Please, have a look at my comment in your other PR (if it's not done already) ;-)

Long story short: The main problem is because of the use of json.loads() vs to_python_objects() and json.dumps() vs LazyJSONSerializable() for Constance attributes.

@noliveleger noliveleger merged commit 838d80b into feature/user-project-metadata Aug 14, 2023
3 checks passed
@noliveleger noliveleger deleted the add-runpython-migration-for-missing-fields branch August 14, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants