Browse files

Return undefined if the property doesn't exist on this record in mong…

…odb.
  • Loading branch information...
1 parent 0d5b09e commit 520af0a2dbb1c8db167beae1b3dfaf53e59a9244 @matthusby matthusby committed Jul 18, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/db_adapters/boss_db_adapter_mongodb.erl
View
2 src/db_adapters/boss_db_adapter_mongodb.erl
@@ -326,6 +326,8 @@ pack_id(BossId) ->
[]
end.
+unpack_id(_Type, undefined) ->
+ undefined;
unpack_id(Type, MongoId) ->
lists:concat([Type, "-", binary_to_list(dec2hex(element(1, MongoId)))]).

0 comments on commit 520af0a

Please sign in to comment.