-
Notifications
You must be signed in to change notification settings - Fork 269
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 extras FKs and related names #3262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautiful and I love it. I only have a simple question and one comment about a FIXME. But this is good to go IMO.
bd493d9
to
4ec598b
Compare
# Conflicts: # nautobot/docs/installation/upgrading-from-nautobot-v1.md # nautobot/extras/api/serializers.py # nautobot/extras/jobs.py # nautobot/extras/models/jobs.py # nautobot/extras/tests/test_api.py # nautobot/extras/tests/test_customfields.py # nautobot/extras/tests/test_views.py # nautobot/extras/views.py
# Conflicts: # nautobot/extras/api/serializers.py # nautobot/extras/tests/test_customfields.py
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
# Conflicts: # nautobot/docs/installation/upgrading-from-nautobot-v1.md # nautobot/extras/filters/__init__.py # nautobot/extras/tests/test_filters.py
Probably needs to be changed to |
@@ -918,7 +918,7 @@ def validate(self, data): | |||
class JobInputSerializer(serializers.Serializer): | |||
data = serializers.JSONField(required=False, default=dict) | |||
commit = serializers.BooleanField(required=False, default=None) | |||
schedule = NestedScheduledJobSerializer(required=False) | |||
scheduled_job = NestedScheduledJobSerializer(required=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change probably needs to be documented somewhere in the upgrading guide (it's not a model serializer per se so it doesn't fit in the current tables, though).
This will also need to be updated in nautobot/docs/additional-features/job-scheduling-and-approvals.md
and probably nautobot/docs/additional-features/jobs.md
as well.
It seems like a similar change to the _schedule
fields in JobMultiPartInputSerializer
should also be made and reflected in nautobot.extras.api.views._run_job
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I'm going to revert this particular change and the associated changes to _run_job
and the tests in #3368. This is because this isn't actually a nested ScheduledJob
object reference, but rather just a set of parameters to the run_job
function that we represent in a fashion "similar to" a ScheduledJob
.
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
# Conflicts: # nautobot/docs/installation/upgrading-from-nautobot-v1.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One remaining comment, otherwise good to go. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tests pass, !
Closes: #3067
What's Changed
TODO