Skip to content

Commit

Permalink
Fix creation hooks being called for Upload
Browse files Browse the repository at this point in the history
The mixin for automatic calling of creation hooks was missing on the
Upload model.

fixes pulp#5199
  • Loading branch information
mdellweg committed Apr 11, 2024
1 parent f8a896b commit 1bdcf6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES/5199.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix Upload failing to run post create hooks.
On installations using the default access policy, this fixes the automatic owner assignment for
users with the `core.upload_create` role on upload objects.
4 changes: 2 additions & 2 deletions pulpcore/app/models/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from django.dispatch import receiver
from rest_framework import serializers

from pulpcore.app.models import BaseModel, fields, storage
from pulpcore.app.models import BaseModel, fields, storage, AutoAddObjPermsMixin
from pulpcore.app.util import get_domain_pk


class Upload(BaseModel):
class Upload(BaseModel, AutoAddObjPermsMixin):
"""
A chunked upload. Stores chunks until used to create an artifact, etc.
Expand Down

0 comments on commit 1bdcf6d

Please sign in to comment.