|
@@ -6,7 +6,6 @@ __author__ = 'marcos.medeiros'
|
|
|
|
|
|
from rapid.registry import registry, Action
|
|
|
from rapid import filters
|
|
|
-import rapidfields
|
|
|
|
|
|
import itertools
|
|
|
from django.db import models
|
|
@@ -169,7 +168,7 @@ class ModelData:
|
|
|
if f.bare_name() in ignore_fields:
|
|
|
ignore_fields.remove(f.bare_name())
|
|
|
continue
|
|
|
- if isinstance(f.field, rapidfields.AlternativeDataTables):
|
|
|
+ if hasattr(f.field, 'is_rapid_alternatives') and f.field.is_rapid_alternatives:
|
|
|
for ff in self.rapid_alternative_data():
|
|
|
if ff[1].ct_field == f.bare_name():
|
|
|
f = FieldData(ff[1])
|
|
@@ -211,7 +210,7 @@ class ModelData:
|
|
|
Those are not returned by fields()
|
|
|
"""
|
|
|
for k, v in self.model.__dict__.iteritems():
|
|
|
- if isinstance(v, rapidfields.AlternativeData):
|
|
|
+ if hasattr(v, 'is_rapid_alternatives') and v.is_rapid_alternatives:
|
|
|
yield (k, v)
|
|
|
|
|
|
def related_fields(self):
|