Skip to content

Commit ff675ab

Browse files
committed
Only trigger warning about project_name if it's being set to something
that isn't `None`.
1 parent 15755f4 commit ff675ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/psij/job_attributes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def project_name(self) -> Optional[str]:
166166

167167
@project_name.setter
168168
def project_name(self, project_name: Optional[str]) -> None:
169-
logger.warning('The "project_name" attribute is deprecated. Please use the "account" '
170-
'attribute instead.')
169+
if project_name is not None:
170+
logger.warning('The "project_name" attribute is deprecated. Please use the "account" '
171+
'attribute instead.')
171172
self.account = project_name

0 commit comments

Comments
 (0)