Changes between Version 15 and Version 16 of AuditTrail


Ignore:
Timestamp:
Dec 5, 2008, 4:24:16 AM (16 years ago)
Author:
Jeff Kowalczyk
Comment:

If a model has primary_key = True, a second primary key would be created in the audit model. For each copied field, set primary_key to false.

Legend:

Unmodified
Added
Removed
Modified
  • AuditTrail

    v15 v16  
    129129
    130130{{{
    131 #!python
    132131from django.dispatch import dispatcher
    133132from django.db import models
     
    289288            # is created and multiple audit entries for one item fail.
    290289            attrs[field.name]._unique = False
     290            # If a model has primary_key = True, a second primary key would be
     291            # created in the audit model. Set primary_key to false.
     292            attrs[field.name].primary_key = False
    291293
    292294    for track_field in _track_fields(kwargs['track_fields']):
Back to Top