firebase / firebase/firebase-admin-python

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

未关闭
#687 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api: database
主要语言
Python
星标
1.2k
派生
359
平均合并
5 天 6 分钟
30 天内合并 PR
2

描述

### [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())
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。