parameters: (self, project_id)
docstring: Set all bad imagery tasks as ready for mapping
          ---
          tags:
              - tasks
          produces:
              - application/json
          parameters:
              - in: header
                name: Authorization
                description: Base64 encoded session token
                required: true
                type: string
                default: Token sessionTokenHere==
              - name: project_id
                in: path
                description: Unique project ID
                required: true
                type: integer
                default: 1
          responses:
              200:
                  description: All bad imagery tasks marked ready for mapping
              401:
                  description: Unauthorized - Invalid credentials
              403:
                  description: Forbidden
              500:
                  description: Internal Server Error
docstring_summary: Set all bad imagery tasks as ready for mapping
          ---
          tags:
              - tasks
          produces:
              - application/json
          parameters:
              - in: header
                name: Authorization
                description: Base64 encoded session token
                required: true
                type: string
                default: Token sessionTokenHere==
              - name: project_id
                in: path
                description: Unique project ID
                required: true
                type: integer
                default: 1
          responses:
              200:
                  description: All bad imagery tasks marked ready for mapping
              401:
                  description: Unauthorized - Invalid credentials
              403:
                  description: Forbidden
              500:
                  description: Internal Server Error
docstring_tokens: Set all bad imagery tasks as ready for mapping --- tags : - tasks produces : - application / json parameters : - in : header name : Authorization description : Base64 encoded session token required : true type : string default : Token sessionTokenHere == - name : project_id in : path description : Unique project ID required : true type : integer default : 1 responses : 200 : description : All bad imagery tasks marked ready for mapping 401 : description : Unauthorized - Invalid credentials 403 : description : Forbidden 500 : description : Internal Server Error
function: def post(self, project_id):
          """
          Set all bad imagery tasks as ready for mapping
          ---
          tags:
              - tasks
          produces:
              - application/json
          parameters:
              - in: header
                name: Authorization
                description: Base64 encoded session token
                required: true
                type: string
                default: Token sessionTokenHere==
              - name: project_id
                in: path
                description: Unique project ID
                required: true
                type: integer
                default: 1
          responses:
              200:
                  description: All bad imagery tasks marked ready for mapping
              401:
                  description: Unauthorized - Invalid credentials
              403:
                  description: Forbidden
              500:
                  description: Internal Server Error
          """
          try:
              authenticated_user_id = token_auth.current_user()
              ProjectAdminService.is_user_action_permitted_on_project(
                  authenticated_user_id, project_id
              )
          except ValueError as e:
              error_msg = f"TasksActionsResetBadImageryAllAPI POST: {str(e)}"
              return {"Error": error_msg}, 403
  
          try:
              MappingService.reset_all_badimagery(project_id, authenticated_user_id)
              return {"Success": "All bad imagery tasks marked ready for mapping"}, 200
          except Exception as e:
              error_msg = (
                  f"TasksActionsResetBadImageryAllAPI POST - unhandled error: {str(e)}"
              )
              current_app.logger.critical(error_msg)
              return {"Error": "Unable to reset tasks"}, 500
function_tokens: def post ( self , project_id ) : try : authenticated_user_id = token_auth . current_user ( ) ProjectAdminService . is_user_action_permitted_on_project ( authenticated_user_id , project_id ) except ValueError as e : error_msg = f"TasksActionsResetBadImageryAllAPI POST: {str(e)}" return { "Error" : error_msg } , 403 try : MappingService . reset_all_badimagery ( project_id , authenticated_user_id ) return { "Success" : "All bad imagery tasks marked ready for mapping" } , 200 except Exception as e : error_msg = ( f"TasksActionsResetBadImageryAllAPI POST - unhandled error: {str(e)}" ) current_app . logger . critical ( error_msg ) return { "Error" : "Unable to reset tasks" } , 500