Skip to content

Commit

Permalink
Make platform_id unnecessary when skipping trusted upload signing (go…
Browse files Browse the repository at this point in the history
…ogle#4065)

The original check works for the quick upload form because it passes the
platform param. The full upload form only passes an optional platform
param for Android so we shouldn't require it to skip trusted upload
signing. The job.lower should be enough in that case.
  • Loading branch information
johnathan79717 authored Jul 22, 2024
1 parent 578b401 commit fba2390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/appengine/handlers/upload_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
"""Handler that uploads a testcase"""

# pylint: disable=wrong-import-order
import ast
import datetime
import io
Expand Down Expand Up @@ -392,7 +393,8 @@ def do_post(self):

if (not trusted_agreement_signed and
task_utils.is_remotely_executing_utasks() and
(platform_id != 'Linux' or job.platform.lower() != 'linux')):
((platform_id and platform_id != 'Linux') or
job.platform.lower() != 'linux')):
# Trusted agreement was not signed even though the job has privileges and
# there are other jobs that don't have privileges.
raise helpers.EarlyExitError(
Expand Down

0 comments on commit fba2390

Please sign in to comment.