Poor error message when many field not set to True when passed a list of instances #8711
              
                Unanswered
              
          
                  
                    
                      justin107d
                    
                  
                
                  asked this question in
                Ideas & Suggestions
              
            Replies: 1 comment 1 reply
-
| Interesting idea. Could be worth a go yup. | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice if when multiple instances are passed to the serializer that it told you the error was because
many=Truewas not set.This happened on a ModelSerializer with certain fields excluded shortly after adding a field to the model. The error received referred to the 'missing' field instead of receiving multiple instances. Setting
many=Truefixed the issue.I am new to open source and would like to help if I can or if it is appropriate here.
I think adding something similar to the following around line 117-118 of the serializer.py
Beta Was this translation helpful? Give feedback.
All reactions