Skip to content

Instantly share code, notes, and snippets.

@c0nstantine
Created October 24, 2014 15:28
Show Gist options
  • Save c0nstantine/e0a674e429a66693f2e8 to your computer and use it in GitHub Desktop.
Save c0nstantine/e0a674e429a66693f2e8 to your computer and use it in GitHub Desktop.
$ git diff rm/models/mongo/__init__.py
diff --cc rm/models/mongo/__init__.py
index f2ff376,48eb469..0000000
--- a/rm/models/mongo/__init__.py
+++ b/rm/models/mongo/__init__.py
@@@ -279,15 -323,13 +322,23 @@@ class MongoModel(object)
@classmethod
def pack_fields(cls, query):
++<<<<<<< HEAD
+ from community.utils import map_names
+ mappings = dict([(key, val.shortname) for key, val in cls.fields.iteritems()])
++=======
+ mappings = cls.get_longname_to_shortname()
++>>>>>>> dev
packed_query = map_names(mappings, query)
return packed_query
@classmethod
def unpack_fields(cls, query):
++<<<<<<< HEAD
+ from community.utils import map_names
+ mappings = dict([(val.shortname, key) for key, val in cls.fields.iteritems()])
++=======
+ mappings = cls.get_shortname_to_longname()
++>>>>>>> dev
unpacked_query = map_names(mappings, query)
return unpacked_query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment