Skip to content

Soft delete removes auth_field from document #1188

@gwainer

Description

@gwainer

Expected Behavior

When using soft delete, the deleted document should remain with auth_field after deleted. I've tested using eve 0.7 and this is true, but I've noticed using eve 0.8 that with soft delete enabled, when a document is deleted, its auth_field is removed.

I see here, inside eve's deleteitem function, the document is retrieved from database with force_auth_field_projection with default value False, and then here this document without auth_field replaces the original.

That's undesired in my case because I need to keep the deleted documents belonging to the user that owns it. So later when getting the deleted documents I can bring the ones he deleted, and losing the auth_field this is not possible, the document ends ups inaccessible since it has no auth_field but the schema uses it.

Environment

  • Python version: 3.5.1
  • Eve version: 0.8

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions