I want to lock a value in a ForeignKey field in a record once two other fields are non-blank.

The record can be saved with changes to that ForeignKey field provided one of the other two fields is blank.

Other fields in the record can be changed or the record deleted and reinserted but it will be a business rule violation to change that ForeignKey.

I thought of adding a duplicate field and if both of the other fields are non-blank comparing the duplicate with the ForeignKey field to see if a violation has occurred. Seems messy.

How can I do this?

Thanks

Mike

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to