### Apache Airflow version

2.5.1

### What happened

The `Try Number` filter is comparing the given integer with an instance of a "property" object 

* screenshots

  ![2023-03-01_11-30](https://user-images.githubusercontent.com/14293802/222210209-fc17c634-4005-4f3d-bee1-30ed23403e71.png)
  ![2023-03-01_11-31](https://user-images.githubusercontent.com/14293802/222210227-53ef42b7-0b43-4ee1-ad76-cf31b504b4a3.png)

* text version

  ```
  Something bad has happened.
  
  Airflow is used by many users, and it is very likely that others had similar problems and you can easily find
  a solution to your problem.
  
  Consider following these steps:
  
    * gather the relevant information (detailed logs with errors, reproduction steps, details of your deployment)
  
    * find similar issues using:
       * [GitHub Discussions](https://github.com/apache/airflow/discussions)
       * [GitHub Issues](https://github.com/apache/airflow/issues)
       * [Stack Overflow](https://stackoverflow.com/questions/tagged/airflow)
       * the usual search engine you use on a daily basis
  
    * if you run Airflow on a Managed Service, consider opening an issue using the service support channels
  
    * if you tried and have difficulty with diagnosing and fixing the problem yourself, consider creating a [bug report](https://github.com/apache/airflow/issues/new/choose).
      Make sure however, to include all relevant details and results of your investigation so far.
  
  Python version: 3.8.16
  Airflow version: 2.5.1
  Node: kip-airflow-8b665fdd7-lcg6q
  -------------------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app
      response = self.full_dispatch_request()
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1822, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request
      rv = self.dispatch_request()
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request
      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 133, in wraps
      return f(self, *args, **kwargs)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/views.py", line 554, in list
      widgets = self._list()
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 1164, in _list
      widgets = self._get_list_widget(
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 1063, in _get_list_widget
      count, lst = self.datamodel.query(
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py", line 461, in query
      count = self.query_count(query, filters, select_columns)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py", line 382, in query_count
      return self._apply_inner_all(
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py", line 368, in _apply_inner_all
      query = self.apply_filters(query, inner_filters)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/models/sqla/interface.py", line 223, in apply_filters
      return filters.apply_all(query)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/models/filters.py", line 300, in apply_all
      query = flt.apply(query, value)
    File "/usr/local/airflow/.local/lib/python3.8/site-packages/flask_appbuilder/models/sqla/filters.py", line 169, in apply
      return query.filter(field > value)
  TypeError: '>' not supported between instances of 'property' and 'int'
  ```

### What you think should happen instead

The "Try Number" search should compare integer with integer

### How to reproduce

1. Go to "Browse" -> "Task Instances"
2. "Search" -> "Add Filter" -> choose "Dag Id" and "Try Number"
3. Choose "Greater than" in the drop-down and enter an integer
4. Click "Search"

### Operating System

Debian GNU/Linux 10 (buster)

### Versions of Apache Airflow Providers

_No response_

### Deployment

Other Docker-based deployment

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

#
#
#
from __future__ import annotations
import collections.abc
import contextlib
import hashlib
import logging
import math
import operator
import os
import signal
import warnings
from collections import defaultdict
from datetime import datetime, timedelta
from enum import Enum
from functools import partial
from pathlib import PurePath
from types import TracebackType
from typing import TYPE_CHECKING, Any, Callable, Collection, Generator, Iterable, NamedTuple, Tuple
from urllib.parse import quote
import dill
import jinja2
import lazy_object_proxy
import pendulum
from jinja2 import TemplateAssertionError, UndefinedError
from sqlalchemy import (
    Column,
    DateTime,