Commit 642ded8 1 parent ebfd456 commit 642ded8 Copy full SHA for 642ded8
File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -371,10 +371,20 @@ def get_status(self):
371
371
if not self .status :
372
372
self .status .append (self .Status (user = None , status = "new" ))
373
373
if len (self .status ) > 1 :
374
- # TODO: at some point replace the waning with an exception:
375
- # raise RuntimeError("More than one status available")
376
- logging .warning ("More than one status available" )
377
- return self .status [0 ] # always return the last element in the array
374
+ self_id = self .id if hasattr (self , "id" ) else None
375
+ # TODO: Change from warning to raising an exception once we ensured
376
+ # it won't affect the deployment.
377
+ # raise RuntimeError(
378
+ # "More than one status available for object [%s] with ID: [%s]",
379
+ # str(type(self).__name__),
380
+ # str(self_id)
381
+ # )
382
+ logging .warning (
383
+ "More than one status available for object [%s] with ID: [%s]" ,
384
+ str (type (self ).__name__ ),
385
+ str (self_id )
386
+ )
387
+ return self .status [0 ]
378
388
379
389
380
390
class GenericAttributeMixin (object ):
You can’t perform that action at this time.
0 commit comments