Fixed username and password fields being swapped on some new entries

Former-commit-id: 7cadad4527f9e08aa9f3b45e9d4d4b683709c5fd
Former-commit-id: 0949d3b8c4f2e050597f3a2e41e2795d7a380ff4
This commit is contained in:
2023-06-20 09:50:42 -04:00
parent 307bcc3faa
commit 7dedfcac17
+4 -4
View File
@@ -412,7 +412,7 @@ def add_entry():
# note entry # note entry
if arguments[2] in ('note', '-n'): if arguments[2] in ('note', '-n'):
_username, _password, _url, _note = '', '', '', edit_note([]) _password, _username, _url, _note = '', '', '', edit_note([])
else: else:
# password entry # password entry
_username = str(input('username: ')) _username = str(input('username: '))
@@ -421,10 +421,10 @@ def add_entry():
if input('add a note to this entry? (y/N) ').lower() == 'y': if input('add a note to this entry? (y/N) ').lower() == 'y':
_note = edit_note([]) _note = edit_note([])
else: else:
_note = [] _note = ''
print('\n\u001b[1mentry preview:\u001b[0m') print('\n\u001b[1mentry preview:\u001b[0m')
entry_reader([_username, _password, _url, _note]) entry_reader([_password, _username, _url, _note])
encrypt([_username, _password, _url, _note], directory + entry_name, gpg_id) encrypt([_password, _username, _url, _note], directory + entry_name, gpg_id)
# creates a new folder # creates a new folder