data/model/oci/tag.py
def lookup_notifiable_tags_for_legacy_image(docker_image_id, storage_uuid, event_name):
    """
    Yields any alive Tags found in repositories with an event with the given name registered and
    whose legacy Image has the given docker image ID and storage UUID.
    """
    event = ExternalNotificationEvent.get(name=event_name)
    images = (
        Image.select()
        .join(ImageStorage)
        .where(Image.docker_image_id == docker_image_id, ImageStorage.uuid == storage_uuid)
    )

    for image in list(images):
        # Ensure the image is under a repository that supports the event.
        try:
            RepositoryNotification.get(repository=image.repository_id, event=event)
        except RepositoryNotification.DoesNotExist:
            continue

        # If found in a repository with the valid event, yield the tag(s) that contains the image.
        for tag in tags_containing_legacy_image(image):
            yield tag

    Yields any alive Tags found in repositories with an event with the given name registered and
    whose legacy Image has the given docker image ID and storage UUID.
    
Yields any alive Tags found in repositories with an event with the given name registered and
whose legacy Image has the given docker image ID and storage UUID.
Yields any alive Tags found in repositories with an event with the given name registered and whose legacy Image has the given docker image ID and storage UUID .
def lookup_notifiable_tags_for_legacy_image(docker_image_id, storage_uuid, event_name):
    event = ExternalNotificationEvent.get(name=event_name)
    images = (
        Image.select()
        .join(ImageStorage)
        .where(Image.docker_image_id == docker_image_id, ImageStorage.uuid == storage_uuid)
    )
    for image in list(images):
        try:
            RepositoryNotification.get(repository=image.repository_id, event=event)
        except RepositoryNotification.DoesNotExist:
            continue
        for tag in tags_containing_legacy_image(image):
            yield tag
def lookup_notifiable_tags_for_legacy_image ( docker_image_id , storage_uuid , event_name ) : event = ExternalNotificationEvent . get ( name = event_name ) images = ( Image . select ( ) . join ( ImageStorage ) . where ( Image . docker_image_id == docker_image_id , ImageStorage . uuid == storage_uuid ) ) for image in list ( images ) : try : RepositoryNotification . get ( repository = image . repository_id , event = event ) except RepositoryNotification . DoesNotExist : continue for tag in tags_containing_legacy_image ( image ) : yield tag
Yields any alive Tags found in repositories with an event with the given name registered and
whose legacy Image has the given docker image ID and storage UUID.
Yields any alive Tags found in repositories with an event with the given name registered and whose legacy Image has the given docker image ID and storage UUID .
"""
    Yields any alive Tags found in repositories with an event with the given name registered and
    whose legacy Image has the given docker image ID and storage UUID.
    """ # Ensure the image is under a repository that supports the event. # If found in a repository with the valid event, yield the tag(s) that contains the image.
docker_image_id
storage_uuid
event_name