Skip to content

Commit

Permalink
fix(LoginMixin): update username and password attributes on new login
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuxt committed Aug 2, 2024
1 parent 2f327b7 commit 6a1c3b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions instagrapi/mixins/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ def login(
A boolean value
"""

if not self.username or not self.password:
if username is None or password is None:
raise BadCredentials("Both username and password must be provided.")

if username and password:
self.username = username
self.password = password

if self.username is None or self.password is None:
raise BadCredentials("Both username and password must be provided.")

if relogin:
self.authorization_data = {}
Expand Down

0 comments on commit 6a1c3b2

Please sign in to comment.