def _check_to_fields_local_valide(self):
res = []
for local_field in self._raw_fields.values():
if isinstance(local_field, LocalFieldValue):
try:
self.model._meta.get_field(local_field.value)
except FieldDoesNotExist:
res.append(
checks.Error(
"the field %s does not exists on the model %s" % (local_field, self.model),
hint=None,
obj=self,
id='compositefk.E003',
)
)
return res
评论列表
文章目录