(self, **kwargs)
| 1160 | return errors |
| 1161 | |
| 1162 | def _check_unique(self, **kwargs): |
| 1163 | return ( |
| 1164 | [ |
| 1165 | checks.Warning( |
| 1166 | "Setting unique=True on a ForeignKey has the same effect as using " |
| 1167 | "a OneToOneField.", |
| 1168 | hint=( |
| 1169 | "ForeignKey(unique=True) is usually better served by a " |
| 1170 | "OneToOneField." |
| 1171 | ), |
| 1172 | obj=self, |
| 1173 | id="fields.W342", |
| 1174 | ) |
| 1175 | ] |
| 1176 | if self.unique |
| 1177 | else [] |
| 1178 | ) |
| 1179 | |
| 1180 | def deconstruct(self): |
| 1181 | name, path, args, kwargs = super().deconstruct() |