2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Iterate over copies

This commit is contained in:
Dan 2018-04-13 18:35:36 +02:00
parent 75cbd18ede
commit 70173adca9

View File

@ -74,15 +74,15 @@ class Syncer:
date=int(time.time()),
peers_by_id={
k: getattr(v, "access_hash", None)
for k, v in client.peers_by_id.items()
for k, v in client.peers_by_id.copy().items()
},
peers_by_username={
k: utils.get_peer_id(v)
for k, v in client.peers_by_username.items()
for k, v in client.peers_by_username.copy().items()
},
peers_by_phone={
k: utils.get_peer_id(v)
for k, v in client.peers_by_phone.items()
for k, v in client.peers_by_phone.copy().items()
}
)