Skip to content

Commit

Permalink
new generator verification support
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 29, 2015
1 parent b1ec2cf commit 125de35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mvc/src/mvc_utils/entity_model.py
Expand Up @@ -38,6 +38,7 @@
""" The license for the module """

import types
import inspect
import datetime
import itertools

Expand Down Expand Up @@ -418,7 +419,7 @@ def _class_find(
# verifies the data type of the entity models sequence and
# taking that into account determines the proper strategy
# to retrieve the first element of the sequence for operations
is_generator = type(entity_models) == types.GeneratorType
is_generator = colony.legacy.is_generator(entity_models)
if is_generator: entity_model = entity_models.next()
else: entity_model = entity_models[0]

Expand Down

0 comments on commit 125de35

Please sign in to comment.