Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-04-01 20:49:04 -04:00
committed by Roberto Rosario
parent 038cd30960
commit 53239385ae
20 changed files with 176 additions and 174 deletions
+5 -5
View File
@@ -503,18 +503,18 @@ class EmailBaseModel(IntervalBaseModel):
), max_length=128, verbose_name=_('Metadata attachment name')
)
subject_metadata_type = models.ForeignKey(
MetadataType, blank=True, help_text=_(
blank=True, help_text=_(
'Select a metadata type valid for the document type selected in '
'which to store the email\'s subject.'
), on_delete=models.CASCADE, null=True, related_name='email_subject',
verbose_name=_('Subject metadata type')
to=MetadataType, verbose_name=_('Subject metadata type')
)
from_metadata_type = models.ForeignKey(
MetadataType, blank=True, help_text=_(
blank=True, help_text=_(
'Select a metadata type valid for the document type selected in '
'which to store the email\'s "from" value.'
), on_delete=models.CASCADE, null=True, related_name='email_from',
verbose_name=_('From metadata type')
to=MetadataType, verbose_name=_('From metadata type')
)
store_body = models.BooleanField(
default=True, help_text=_(
@@ -787,7 +787,7 @@ class WatchFolderSource(IntervalBaseModel):
class SourceLog(models.Model):
source = models.ForeignKey(
Source, on_delete=models.CASCADE, related_name='logs',
on_delete=models.CASCADE, related_name='logs', to=Source,
verbose_name=_('Source')
)
datetime = models.DateTimeField(