Skip to content

remove_workflow_from_object Performs Query Incorrectly #1

@davydany

Description

@davydany

When I call remove_workflow() from workflows.utils and pass my object, it throws a WorkflowObjectRelation.DoesNotExist error.

When I looked into the code, this line performs the query incorrectly: https://github.com/zzgvh/django-workflows/blob/master/workflows/utils.py#L99 ContentTypes relations don't get queried in that manner. And since the exception that it throws is not being reported, there are "ghost" entries in the WorkflowObjectRelation table.

Should be something along the lines of:

    WorkflowObjectRelations.objects.get(content_type = ctype, object_id = obj.pk)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions