1059 | | try: |
1060 | | for f in related.opts.fields: |
1061 | | if f.core: |
1062 | | raise StopIteration |
1063 | | e.add(related.opts, "At least one field in %s should have core=True, because it's being edited inline by %s.%s." % (related.opts.object_name, opts.module_name, opts.object_name)) |
1064 | | except StopIteration: |
1065 | | pass |
| 1059 | if related.edit_inline: |
| 1060 | try: |
| 1061 | for f in related.opts.fields: |
| 1062 | if f.core: |
| 1063 | raise StopIteration |
| 1064 | e.add(related.opts, "At least one field in %s should have core=True, because it's being edited inline by %s.%s." % (related.opts.object_name, opts.module_name, opts.object_name)) |
| 1065 | except StopIteration: |
| 1066 | pass |