Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Whitespace

  • Loading branch information...
commit 00453c1f9ca650e673aa7af56796d5228f946d55 1 parent 67298f4
@issackelly issackelly authored
Showing with 0 additions and 3 deletions.
  1. +0 −3  tastypie/contrib/contenttypes/fields.py
View
3  tastypie/contrib/contenttypes/fields.py
@@ -13,7 +13,6 @@ class GenericForeignKeyField(fields.ToOneField):
"""
def __init__(self, to, attribute, **kwargs):
-
if not isinstance(to, dict):
raise ValueError('to field must be a dictionary in GenericForeignKeyField')
@@ -36,14 +35,12 @@ def get_related_resource(self, related_instance):
@property
def to_class(self):
-
if self._to_class and not issubclass(GenericResource, self._to_class):
return self._to_class
return GenericResource
def resource_from_uri(self, fk_resource, uri, request=None, related_obj=None, related_name=None):
-
try:
obj = fk_resource.get_via_uri(uri, request=request)
fk_resource = self.get_related_resource(obj)
Please sign in to comment.
Something went wrong with that request. Please try again.