Skip to content

Commit

Permalink
Fixed error with enum verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe DeVivo committed Sep 10, 2013
1 parent 1105970 commit 08915a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cuttlefish_generator.erl
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ transform_datatypes(Conf, Mappings) ->
{_, {error, Message}} ->
lager:error("Bad datatype: ~s ~s", [string:join(Variable, "."), Message]),
Acc;
{enum, NewValue} ->
case lists:member(NewValue, cuttlefish_mapping:enum(MappingRecord)) of
{{enum, PossibleValues}, NewValue} ->
case lists:member(NewValue, PossibleValues) of
true -> [{Variable, NewValue}|Acc];
false ->
lager:error("Bad value: ~s for enum ~s", [NewValue, Variable]),
Expand Down

0 comments on commit 08915a7

Please sign in to comment.