Skip to content

Commit 40983a8

Browse files
committed
fix issue when saving profile alias when profile name is 2 parts
1 parent 06b902c commit 40983a8

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
All changes to the package starting with v0.3.1 will be logged here.
44

5+
## v1.2.2 [2023-03-17]
6+
#### What's New
7+
* None
8+
9+
#### Enhancements
10+
* None
11+
12+
#### Bug Fixes
13+
* Fix bug with `logout` command when no active credentials were available
14+
* Expand `--silent/-s` flag to the following commands
15+
* `api`
16+
* `cache profiles`
17+
* `checkin`
18+
* `login`
19+
* `logout`
20+
* `ls [profiles|environments|applications|secrets]`
21+
* `request [submit|withdraw]`
22+
* `secret view`
23+
* `user`
24+
* Fix bug when saving profile alias when the `PROFILE` is only 2 parts instead of 3
25+
26+
#### Dependencies
27+
* None
28+
29+
#### Other
30+
* None
31+
532
## v1.2.1 [2023-03-14]
633
#### What's New
734
* None

src/pybritive/helpers/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ def validate_global(self, section, fields):
276276

277277
def validate_profile_aliases(self, section, fields):
278278
for field, value in fields.items():
279-
if len(profile_split(value)) != 3:
280-
error = f'Invalid {section} field {field} value {value} provided. Value must be 3 parts ' \
279+
if len(profile_split(value)) not in [2, 3]:
280+
error = f'Invalid {section} field {field} value {value} provided. Value must be 2 or 3 parts ' \
281281
'separated by a /'
282282
self.validation_error_messages.append(error)
283283

0 commit comments

Comments
 (0)