Commits

Owen Nelson committed be4dd44

I suppose other types of lookup should work just fine. __in is the only special case

Comments (0)

Files changed (1)

ipyfield/models.py

         return value.int()
 
     def get_prep_lookup(self, lookup_type, value):
-        if lookup_type == 'exact':
-            return self.get_prep_value(value)
-        elif lookup_type == 'in':
+        if lookup_type == 'in':
             if isinstance(value, str) and '/' in value:
                 # convert to CIDR iter
                 value = IP(value)
             return [self.get_prep_value(v) for v in value]
-        else:
-            raise TypeError('Lookup type %r not supported.' % lookup_type)
+        else: 
+            return self.get_prep_value(value)
 
     def get_internal_type(self):
         return 'BigIntegerField'