File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -541,12 +541,13 @@ def should_upgrade_resource(available_resource, existing_resources):
541541 """
542542 # should upgrade resource?
543543 res_name = available_resource .get ('Name' , available_resource .get ('name' ))
544- # no, if it's upload
545- if existing_resources [res_name ].origin == 'upload' :
546- return False
547544
548- # no, if we already have it (and upstream doesn't have a newer res available)
545+ # do we have it already?
549546 if res_name in existing_resources :
547+ # no upgrade, if it's upload
548+ if existing_resources [res_name ].origin == 'upload' :
549+ return False
550+ # no upgrade, if upstream doesn't have a newer revision of the resource available
550551 available_rev = available_resource .get ('Revision' , available_resource .get ('revision' , - 1 ))
551552 u_fields = existing_resources [res_name ].unknown_fields
552553 existing_rev = u_fields .get ('Revision' , u_fields .get ('revision' , - 1 ))
You can’t perform that action at this time.
0 commit comments