It seems like here https://github.com/openstack/barbican/blob/d2ce5952ddaa6fd659b0dcc0a0f8f0eba6f3988c/barbican/plugin/dogtag.py#L588 dogtag does not return mode if it was not requested explicitly. So here it is returned https://github.com/openstack/barbican/blob/d2ce5952ddaa6fd659b0dcc0a0f8f0eba6f3988c/barbican/plugin/dogtag.py#L253, then from here https://github.com/openstack/barbican/blob/baf5edfbf9eff60ede03fd167e124960c126e525/barbican/plugin/resources.py#L279 it gets to here https://github.com/openstack/barbican/blob/baf5edfbf9eff60ede03fd167e124960c126e525/barbican/plugin/resources.py#L111, and then at https://github.com/openstack/barbican/blob/baf5edfbf9eff60ede03fd167e124960c126e525/barbican/plugin/resources.py#L348 barbican tries to save it into db.
Then during save this https://github.com/openstack/barbican/blob/0539a28ee95479a707b7dc3da635308a682e2ecc/barbican/model/repositories.py#L845 happens, and value is defined as not nullable here https://github.com/openstack/barbican/blob/0539a28ee95479a707b7dc3da635308a682e2ecc/barbican/model/models.py#L372
It seems like here https:/ /github. com/openstack/ barbican/ blob/d2ce5952dd aa6fd659b0dcc0a 0f8f0eba6f3988c /barbican/ plugin/ dogtag. py#L588 dogtag does not return mode if it was not requested explicitly. So here it is returned https:/ /github. com/openstack/ barbican/ blob/d2ce5952dd aa6fd659b0dcc0a 0f8f0eba6f3988c /barbican/ plugin/ dogtag. py#L253, then from here https:/ /github. com/openstack/ barbican/ blob/baf5edfbf9 eff60ede03fd167 e124960c126e525 /barbican/ plugin/ resources. py#L279 it gets to here https:/ /github. com/openstack/ barbican/ blob/baf5edfbf9 eff60ede03fd167 e124960c126e525 /barbican/ plugin/ resources. py#L111, and then at https:/ /github. com/openstack/ barbican/ blob/baf5edfbf9 eff60ede03fd167 e124960c126e525 /barbican/ plugin/ resources. py#L348 barbican tries to save it into db.
Then during save this https:/ /github. com/openstack/ barbican/ blob/0539a28ee9 5479a707b7dc3da 635308a682e2ecc /barbican/ model/repositor ies.py# L845 happens, and value is defined as not nullable here https:/ /github. com/openstack/ barbican/ blob/0539a28ee9 5479a707b7dc3da 635308a682e2ecc /barbican/ model/models. py#L372