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

Fixes: 18593 - "Create & Add Another" broken for new IP addresses #18602

Conversation

renatoalmeidaoliveira
Copy link
Collaborator

Fixes: #18593 - "Create & Add Another" broken for new IP addresses

  • Changes IPAddressEditView's get_extra_addanother_params to return super().get_extra_addanother_params(request) when the GET params interface or vminterface

Its also possible to solve this issue returning {} if there aren't any match in the if clauses, IMO returning super().get_extra_addanother_params(request) could be more flexible in the future.
Please let me know if you prefer to use another approach.

@@ -864,10 +864,12 @@ def alter_object(self, obj, request, url_args, url_kwargs):
return obj

def get_extra_addanother_params(self, request):
extra_params = super().get_extra_addanother_params(request)
Copy link
Member

Choose a reason for hiding this comment

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

No need to call super(); it can just return an empty dictionary.

@jeremystretch jeremystretch merged commit 154b3a7 into netbox-community:main Feb 11, 2025
3 checks passed
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.

"Create & Add Another" broken for new IP addresses
2 participants