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 option to override defaults to converttargetextras #945

Closed
rachel3834 opened this issue May 29, 2024 · 0 comments · Fixed by #946
Closed

Add option to override defaults to converttargetextras #945

rachel3834 opened this issue May 29, 2024 · 0 comments · Fixed by #946
Assignees
Labels
enhancement New feature or request User Issue Raised by a user

Comments

@rachel3834
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I am trying to convert the extra parameters for the targets in my existing TOM to attributes on a custom Target model. I've designed the custom Target model and migrated the database, and I am now using the TOM's built-in converttargetextras.py management command.
But instead of changing the extra_param values into Target attributes, the code is skipping all entries. On inspection, this seems to be because the Target attributes have been created with a default value, meaning that they have a valid entry before the management command is run. The command is designed to skip any value which already has an entry.

Describe the solution you'd like
The command being designed to skip attributes with existing values is reasonable but the documentation which describes setting up the custom Targets gives examples of defining parameters where default values are given. This means that once the database is migrated, the Target attributes will always be populated with defaults for those parameters where defaults are specified, and the converttargetextra command will always skip those parameters. The command should offer a way for the user to override this behavior if they chose, and the documentation should highlight this more prominently than it currently does.

@rachel3834 rachel3834 added the enhancement New feature or request label May 29, 2024
@github-project-automation github-project-automation bot moved this to Triage in TOM Toolkit May 29, 2024
@jchate6 jchate6 moved this from Triage to In progress in TOM Toolkit May 29, 2024
@jchate6 jchate6 linked a pull request May 29, 2024 that will close this issue
@jchate6 jchate6 added the User Issue Raised by a user label May 29, 2024
@jchate6 jchate6 closed this as completed Jun 8, 2024
@github-project-automation github-project-automation bot moved this from In progress to Closed in TOM Toolkit Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request User Issue Raised by a user
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants