Fix errors on query plugins collection by multi field#1300
Merged
Conversation
7 tasks
Glucksberg
pushed a commit
to Glucksberg/omi-local
that referenced
this pull request
Apr 28, 2026
…1300) Error: ``` /opt/homebrew/lib/python3.11/site-packages/google/cloud/firestore_v1/base_collection.py:300: UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead. return query.where(field_path, op_string, value) /private/tmp/x.py:41: UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead. unapproved = db.collection('plugins_data').where('approved', '==', False).where('uid', '==', uid).stream() Traceback (most recent call last): File "/private/tmp/x.py", line 70, in <module> print(get_plugins_data_from_db("eLCxTds6QyUAHraZug48i8ZlGL23")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/x.py", line 58, in get_plugins_data_from_db public_data = get_public_plugins_db(uid) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/x.py", line 42, in get_public_plugins_db data.extend([doc.to_dict() for doc in unapproved]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/x.py", line 42, in <listcomp> data.extend([doc.to_dict() for doc in unapproved]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/google/cloud/firestore_v1/query.py", line 357, in _make_stream response_iterator, expected_prefix = self._get_stream_iterator( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/google/cloud/firestore_v1/query.py", line 223, in _get_stream_iterator request, expected_prefix, kwargs = self._prep_stream( ^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/google/cloud/firestore_v1/base_query.py", line 1027, in _prep_stream "structured_query": self._to_protobuf(), ^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/google/cloud/firestore_v1/base_query.py", line 968, in _to_protobuf "where": self._filters_pb(), ^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/google/cloud/firestore_v1/base_query.py", line 847, in _filters_pb composite_filter.filters.append(_filter_pb(filter_)) TypeError: Parameter to MergeFrom() must be instance of same class: expected google.firestore.v1.StructuredQuery.Filter got Filter. ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Error: