Skip to content

Commit

Permalink
Revert "Support lookups on objects_represented that aren't PositiveIn…
Browse files Browse the repository at this point in the history
…tegerFields (fix #4)"

This is being reverted because PostgreSQL fails to compare int and
varchar keys, resulting in the need for ugly hacks. Will reconsider
this feature.

This reverts commit de430de.
  • Loading branch information
eranrund committed Aug 8, 2016
1 parent de430de commit 0690959
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 29 deletions.
6 changes: 0 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
Version 1.1.2
===========================================================
* Change `RelatedObject.related_id` field type to CharField to allow referencing targets
who override their primary key to a non-integer field type.


Version 1.1.1
===========================================================
* Add a new `data_adapter` argument to `papertrail.log`. The method
Expand Down
2 changes: 1 addition & 1 deletion papertrail/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '1.1.2'
__version__ = '1.1.1'
default_app_config = 'papertrail.apps.PapertrailConfig'
20 changes: 0 additions & 20 deletions papertrail/migrations/0003_auto_20160808_1737.py

This file was deleted.

2 changes: 1 addition & 1 deletion papertrail/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def targets_model(self):
class RelatedObject(models.Model):
relation_name = models.CharField(max_length=100, db_index=True)
related_content_type = models.ForeignKey(ContentType)
related_id = models.CharField(max_length=32, db_index=True)
related_id = models.PositiveIntegerField(db_index=True)
related_object = GenericForeignKey('related_content_type', 'related_id')

class Meta:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='django-papertrail',
version='1.1.2',
version='1.1.1',
packages=['papertrail'],
install_requires=[
'Django>=1.7',
Expand Down

0 comments on commit 0690959

Please sign in to comment.