Skip to content

Commit

Permalink
Use BaseModel instead of Model
Browse files Browse the repository at this point in the history
pulpcore changed the name of `Model` to `BaseModel`. This PR updated
pulp_rpm to do the same.

Required PR: pulp/pulpcore#421

https://pulp.plan.io/issues/5693
closes #5693
  • Loading branch information
bmbouter committed Dec 2, 2019
1 parent 3708978 commit 6692804
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES/5693.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use `BaseModel` instead of `Model`.
8 changes: 4 additions & 4 deletions pulp_rpm/app/models/advisory.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from django.utils.dateparse import parse_datetime

from pulpcore.plugin.models import (
BaseModel,
Content,
Model,
)

from pulp_rpm.app.constants import (
Expand Down Expand Up @@ -198,7 +198,7 @@ class Meta:
default_related_name = "%(app_label)s_%(model_name)s"


class UpdateCollection(Model):
class UpdateCollection(BaseModel):
"""
A collection of UpdateCollectionPackages with an associated nametag.
Expand Down Expand Up @@ -275,7 +275,7 @@ def to_createrepo_c(self):
return col


class UpdateCollectionPackage(Model):
class UpdateCollectionPackage(BaseModel):
"""
Part of an UpdateCollection, representing a package.
Expand Down Expand Up @@ -383,7 +383,7 @@ def to_createrepo_c(self):
return pkg


class UpdateReference(Model):
class UpdateReference(BaseModel):
"""
A reference to the additional information about the problem solved by an update.
Expand Down
10 changes: 5 additions & 5 deletions pulp_rpm/app/models/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from django.db import models

from pulpcore.plugin.models import (
BaseModel,
Content,
ContentArtifact,
Model,
Repository,
)

Expand Down Expand Up @@ -107,7 +107,7 @@ class Meta:
)


class Checksum(Model):
class Checksum(BaseModel):
"""
Distribution Tree Checksum.
Expand Down Expand Up @@ -139,7 +139,7 @@ class Meta:
)


class Image(Model):
class Image(BaseModel):
"""
Distribution Tree Image.
Expand Down Expand Up @@ -189,7 +189,7 @@ class Meta:
)


class Addon(Model):
class Addon(BaseModel):
"""
Distribution Tree Addon.
Expand Down Expand Up @@ -237,7 +237,7 @@ class Meta:
)


class Variant(Model):
class Variant(BaseModel):
"""
Distribution Tree Variant.
Expand Down

0 comments on commit 6692804

Please sign in to comment.