firebase / firebase/firebase-admin-python

.get() method returns a list instead of a dict in Realtime Database

Đang mở
#687 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: database
Ngôn ngữ chính
Python
Star
1.2k
Fork
359
Merge trung bình
5 ngày 6 phút
Pull request đã merge (30 ngày)
2

Mô tả

### [REQUIRED] Step 2: Describe your environment

* Operating System version: windows 11
* Firebase SDK version: 6.1.0
* Firebase Product: Realtime Database
* Python version: 3.9
* Pip version: pip 23.0.1

### [REQUIRED] Step 3: Describe the problem

#### Steps to reproduce:

If you set a key in Realtime Database with a value like this: {"1": "value1", "2": "value2"} and use .get() to retrieve the value, you will receive a list [None, "value1", "value2"] instead of a dict. In addition, it seems that if you use keys that are either too far apart as integers or if you put 0 before a number, you won't get a list.
#### Relevant Code:

```
data.ref.child("key").set({"1": "Hello", "2": "World!"})
print(data.ref.child("key").get())
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.