UniversalScientificTechnologies / OpenIntranet

Software for warehouse and production management
https://universalscientifictechnologies.github.io/OpenIntranet/
GNU General Public License v3.0
0 stars 2 forks source link

udělat to obecně ne jen pro dpp #201

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

udělat to obecně ne jen pro dpp

https://github.com/UniversalScientificTechnologies/OpenIntranet/blob/f93ade5ce9ee70c750ede8127de2c08f5f60cce4/src/OpenIntranet/plugins/helpers/database_user.py#L36

        {"$match": {"_id": user_id}},
        {"$unwind": "$contracts"},
        #{"$match": {"contracts.type": "dpp"}},  # TODO udělat to obecně ne jen pro dpp
        {"$sort": {f"contracts.{sort_by}": -1}},
        {"$group": {"_id": "$_id", "contracts": {"$push": "$contracts"}}}
    ])

f785d91332d69f7309f0ce6a3554e316d15d8f4c