Skip to content

Commit

Permalink
[BUG] Changing phone_number got KeyError: full_name [#514] Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Dec 28, 2021
1 parent 31b6df8 commit 68a410c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions instagrapi/mixins/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ def account_edit(self, **data: Dict) -> Account:
user_data = self.account_info().dict()
user_data = {field: user_data[field] for field in fields}
data = dict(user_data, **data)
# Instagram original field-name for full user name is "first_name"
data["first_name"] = data.pop("full_name")
full_name = data.pop("full_name", None)
if full_name:
# Instagram original field-name for full user name is "first_name"
data["first_name"] = full_name
# Biography with entities (markup)
result = self.private_request("accounts/edit_profile/", self.with_default_data(data))
biography = data.get("biography")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='instagrapi',
version='1.16.7',
version='1.16.8',
author='Mikhail Andreev',
author_email='[email protected]',
license='MIT',
Expand Down

0 comments on commit 68a410c

Please sign in to comment.