Commit b5a0632f authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

Remove @python_2_unicode_compatible



Makes sense only with Python 2 which we do not support.
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 6878320f
......@@ -33,14 +33,12 @@ from django.urls import reverse
from django.db import models
from django.db.models import Q
import django.dispatch
from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import cached_property
from patchwork.fields import HashField
from patchwork.parser import hash_patch, extract_tags
@python_2_unicode_compatible
class Person(models.Model):
email = models.CharField(max_length=255, unique=True)
name = models.CharField(max_length=255, null=True, blank=True)
......@@ -78,7 +76,6 @@ def get_comma_separated_field(value):
return tags
@python_2_unicode_compatible
class Project(models.Model):
linkname = models.CharField(max_length=255, unique=True)
name = models.CharField(max_length=255, unique=True)
......@@ -123,7 +120,6 @@ def user_name(user):
auth.models.User.add_to_class('name', user_name)
@python_2_unicode_compatible
class DelegationRule(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
path = models.CharField(max_length=255)
......@@ -138,7 +134,6 @@ class DelegationRule(models.Model):
unique_together = (('path', 'project'))
@python_2_unicode_compatible
class UserProfile(models.Model):
user = models.OneToOneField(User, unique=True, related_name='profile',
on_delete=models.CASCADE)
......@@ -208,7 +203,6 @@ def _user_saved_callback(sender, created, instance, **kwargs):
models.signals.post_save.connect(_user_saved_callback, sender=User)
@python_2_unicode_compatible
class State(models.Model):
name = models.CharField(max_length=100)
ordering = models.IntegerField(unique=True)
......@@ -225,7 +219,6 @@ class State(models.Model):
ordering = ['ordering']
@python_2_unicode_compatible
class Tag(models.Model):
name = models.CharField(max_length=20)
pattern = models.CharField(max_length=50,
......@@ -300,7 +293,6 @@ def filename(name, ext):
return str.strip('-') + ext
@python_2_unicode_compatible
class Patch(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE)
msgid = models.CharField(max_length=255)
......@@ -507,7 +499,6 @@ class TestState:
# This Model represents the "top level" Series, an object that doesn't change
# with the various versions of patches sent to the mailing list.
@python_2_unicode_compatible
class Series(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE)
name = models.CharField(max_length=200, default=SERIES_DEFAULT_NAME)
......@@ -618,7 +609,6 @@ class RevisionState:
# iteration of a series will create a new revision.
@python_2_unicode_compatible
class SeriesRevision(models.Model):
series = models.ForeignKey(Series, on_delete=models.CASCADE)
version = models.IntegerField(default=1)
......@@ -756,7 +746,6 @@ class EventLog(models.Model):
ordering = ['-event_time']
@python_2_unicode_compatible
class Test(models.Model):
# no mail, default so test systems/scripts can have a grace period to
# settle down and give useful results
......@@ -815,7 +804,6 @@ class Test(models.Model):
return self.name
@python_2_unicode_compatible
class TestResult(models.Model):
test = models.ForeignKey(Test, on_delete=models.CASCADE)
......@@ -864,7 +852,6 @@ class EmailConfirmation(models.Model):
super(EmailConfirmation, self).save()
@python_2_unicode_compatible
class EmailOptout(models.Model):
email = models.CharField(max_length=200, primary_key=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment