Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #10 from swisscom/bugfix/null_in_m2m_rel
Browse files Browse the repository at this point in the history
Bugfix: None in M2M relationships
  • Loading branch information
brki committed Sep 19, 2014
2 parents 702ccd2 + d23909d commit 181a8fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"""

setup(name='CleanerVersion',
version='1.2.1',
version='1.2.2',
description='A versioning solution for relational data models',
long_description='CleanerVersion is a solution that allows you to read and write multiple versions of an entry '
'to and from your relational database. It allows to keep track of modifications on an object '
Expand Down
4 changes: 2 additions & 2 deletions versions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ class VersionedReverseManyRelatedObjectsDescriptor(ReverseManyRelatedObjectsDesc
'related_manager_cls' property
"""

def __get__(self, instance, owner):
def __get__(self, instance, owner=None):
"""
Reads the property as which this object is figuring; mainly used for debugging purposes
:param instance: The instance on which the getter was called
Expand Down Expand Up @@ -704,7 +704,7 @@ def __init__(self, related, via_field_name):
super(VersionedManyRelatedObjectsDescriptor, self).__init__(related)
self.via_field_name = via_field_name

def __get__(self, instance, owner):
def __get__(self, instance, owner=None):
"""
Reads the property as which this object is figuring; mainly used for debugging purposes
:param instance: The instance on which the getter was called
Expand Down
2 changes: 0 additions & 2 deletions versions/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1229,5 +1229,3 @@ def test_filtering_two_jumps_reverse_with_version_at_t2(self):
count = C3.objects.as_of(self.t2) \
.filter(c2s__c1s__name__startswith='c1').propagate_querytime().all().count()
self.assertEqual(2, count)


0 comments on commit 181a8fe

Please sign in to comment.