Skip to Content
Menu
This question has been flagged
1 Reply
2321 Views

Hi Guys,

I am trying to validate the values on my form use "== False" which works with text and boolean based fields, but not with relationship (onetomany) based fields.  What syntax should I be using?

Example code below:

if self.item_group == False:
 error_message = error_message + "\n Item Group "


Appreciate any assistance.

Thanks,
Damien

Avatar
Discard
Best Answer

You can try this code:

if not self.item_group:

     error_message = error_message + "\n Item Group "

Avatar
Discard