--- a/src/hdalab/fields.py Fri Nov 14 17:06:02 2014 +0100
+++ b/src/hdalab/fields.py Sun Nov 16 18:09:42 2014 +0100
@@ -7,9 +7,10 @@
@author: ymh
'''
+from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models import fields as django_fields
-from django.core.exceptions import ObjectDoesNotExist
+from south.modelsinspector import add_introspection_rules
class OneToOneField(models.OneToOneField):
@@ -38,4 +39,14 @@
setattr(instance, self.cache_name, value)
if value is not None:
setattr(value, self.related.field.get_cache_name(), instance)
- return value
\ No newline at end of file
+ return value
+
+add_introspection_rules([
+ (
+ [OneToOneField],
+ [], # Positional arguments (not used)
+ { # Keyword argument
+ "related_default": ["related_default", {"default": None}],
+ },
+ ),
+], ["^hdalab\.fields\.OneToOneField"])
\ No newline at end of file