Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • M Mirror
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • prozorro-sale
  • Mirror
  • Issues
  • #43

Closed
Open
Created Sep 08, 2021 by dmitry.mashoshin@dmitry.mashoshinMaintainer

Fix mirror issue on db.collection.update

    def _serialize_data(self, doc):
        _doc = doc.copy()
        for key, value in _doc.items():
            if isinstance(value, datetime):
                doc[key] = value.isoformat()
            elif isinstance(value, (ObjectId, uuid.UUID)):
                doc[key] = str(value)
        return doc

this part could open hidden fields if it was directly changed by db.collection.update

proposal is to use _id and make call to DB and get full document and use _serialize_document always

Assignee
Assign to
Time tracking