-
Notifications
You must be signed in to change notification settings - Fork 13
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
Handle JSON in Zone POST requests #538
Conversation
I tested this with mreg-cli from the |
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.
- zone.primary_ns = request.data.getlist('primary_ns')[0]
+ zone.primary_ns = nameservers[0]
I'm not going to pretend that I understand why we're simply picking the first one, but the PR retains behaviour and fixes the issue with content type management. That works for me. :)
It is due to Line 58 in b497579
We (ab)use the first name server in the list to be used as mname server in the SOA record for the zone. The zone's |
Now that I know I wish I didn't know. :)
Yep. |
Checks content type before trying to call
getlist
on request data.