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
When and where to set some field value before mutation? #24
Comments
Hey @RainshawGao
|
nice to hear from you!! Thanks for your reply 😊 as in my scenery, the owner field has to be exposed so admins could create the instance for other user, and this field is not null so it is marked required, I have tried a lot of ways to mark it not required but they all not work 😔 so I finally use the second way, to verify the request user and the owner field value in clean_input method and raise error. Thank you again~ |
To automatically mark it as not required you need to mark it with You can also define a list of |
yes, I had tried to define the |
Hey @RainshawGao Is the issue solved? Asking so I can close it here. |
yes! I just make it using clean_input, clean_instance and before_save func |
Hello, I have a model that has a "owner" field with it.
I have two questions:
Looking forward to your reply.
The text was updated successfully, but these errors were encountered: