Skip to content

Commit

Permalink
another try
Browse files Browse the repository at this point in the history
  • Loading branch information
UnDarkle committed Oct 16, 2018
1 parent f6dd3e3 commit 0cb19e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rotest/management/models/resource_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, field_name):
class DataBase(ModelBase):
"""Metaclass that creates data pointers for django fields."""
def __getattr__(cls, key):
if '_meta' in cls.__dict__ and key in cls._meta.get_field_names():
if hasattr(cls, '_meta') and key in cls._meta.get_all_field_names():
return DataPointer(key)

raise AttributeError(key)
Expand Down

0 comments on commit 0cb19e8

Please sign in to comment.