diff --git a/mayan/apps/checkouts/migrations/0005_auto_20160122_0756.py b/mayan/apps/checkouts/migrations/0005_auto_20160122_0756.py new file mode 100644 index 0000000000..f154beedd6 --- /dev/null +++ b/mayan/apps/checkouts/migrations/0005_auto_20160122_0756.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('checkouts', '0004_auto_20150617_0330'), + ] + + operations = [ + migrations.AlterField( + model_name='documentcheckout', + name='document', + field=models.OneToOneField(verbose_name='Document', to='documents.Document'), + ), + ] diff --git a/mayan/apps/checkouts/models.py b/mayan/apps/checkouts/models.py index bbc24bd1f0..45ec9e81b8 100644 --- a/mayan/apps/checkouts/models.py +++ b/mayan/apps/checkouts/models.py @@ -24,9 +24,7 @@ class DocumentCheckout(models.Model): """ Model to store the state and information of a document checkout """ - document = models.ForeignKey( - Document, unique=True, verbose_name=_('Document') - ) + document = models.OneToOneField(Document, verbose_name=_('Document')) checkout_datetime = models.DateTimeField( auto_now_add=True, verbose_name=_('Check out date and time') )