<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.10</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:<br>
Debian with pip install airflow</p>
<p dir="auto"><strong>What happened</strong>:<br>
I have some missing DAGs from the source code and it has the record in the database.<br>
When I upgrade to v1.10.10, those DAGs don't have the description field, which is None by default, so the change on this PR, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="567212421" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/7457" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/7457/hovercard" href="https://github.com/apache/airflow/pull/7457">#7457</a>, will return an error about applying <code class="notranslate">len</code> function to None type.</p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
It should not have any error during the rendering.</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
Remove a registered DAG from the source code. And the error will pop up</p>
<p dir="auto"><strong>Anything else we need to know</strong>:<br>
Nope</p>
<h3 dir="auto">Official Helm Chart version</h3>
<p dir="auto">1.3.0 (latest released)</p>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.2.2</p>
<h3 dir="auto">Kubernetes Version</h3>
<p dir="auto">1.2.1</p>
<h3 dir="auto">Helm Chart configuration</h3>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="airflow:

  env:
    - name: AIRFLOW__SCHEDULER__USE_ROW_LEVEL_LOCKING
      value: &quot;True&quot;

webserver:
  livenessProbe:
    initialDelaySeconds: 100
    timeoutSeconds: 100
    failureThreshold: 20
    periodSeconds: 25

  readinessProbe:
    initialDelaySeconds: 100
    timeoutSeconds: 100
    failureThreshold: 20
    periodSeconds: 25


scheduler:
  replicas: 2

executor: CeleryExecutor"><pre class="notranslate"><span class="pl-ent">airflow</span>:

  <span class="pl-ent">env</span>:
    - <span class="pl-ent">name</span>: <span class="pl-s">AIRFLOW__SCHEDULER__USE_ROW_LEVEL_LOCKING</span>
      <span class="pl-ent">value</span>: <span class="pl-s"><span class="pl-pds">"</span>True<span class="pl-pds">"</span></span>

<span class="pl-ent">webserver</span>:
  <span class="pl-ent">livenessProbe</span>:
    <span class="pl-ent">initialDelaySeconds</span>: <span class="pl-c1">100</span>
    <span class="pl-ent">timeoutSeconds</span>: <span class="pl-c1">100</span>
    <span class="pl-ent">failureThreshold</span>: <span class="pl-c1">20</span>
    <span class="pl-ent">periodSeconds</span>: <span class="pl-c1">25</span>

  <span class="pl-ent">readinessProbe</span>:
    <span class="pl-ent">initialDelaySeconds</span>: <span class="pl-c1">100</span>
    <span class="pl-ent">timeoutSeconds</span>: <span class="pl-c1">100</span>
    <span class="pl-ent">failureThreshold</span>: <span class="pl-c1">20</span>
    <span class="pl-ent">periodSeconds</span>: <span class="pl-c1">25</span>


<span class="pl-ent">scheduler</span>:
  <span class="pl-ent">replicas</span>: <span class="pl-c1">2</span>

<span class="pl-ent">executor</span>: <span class="pl-s">CeleryExecutor</span></pre></div>
<h3 dir="auto">Docker Image customisations</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">What happened</h3>
<p dir="auto">I added 500 dummy dags, and my scheduler/postgres logs are flooded with such error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="duplicate key value violates unique constraint &quot;serialized_dag_pkey&quot;
DETAIL:  Key (dag_id)=(test_dag_454) already exists.    
 scheduler [SQL: INSERT INTO serialized_dag (dag_id, fileloc, fileloc_hash, data, last_updated, dag_hash) VALUES (%(dag_id)s, %(fileloc)s, %(fileloc_hash)s, scheduler [parameters: {'dag_id': 'test_dag_454', 'fileloc': '/opt/airflow/dags/repo/test_dag_454.py', 'fileloc_hash': 14390114031793844, 'data': '{&quot;__vers  scheduler (Background on this error at: http://sqlalche.me/e/13/gkpj)"><pre class="notranslate"><code class="notranslate">duplicate key value violates unique constraint "serialized_dag_pkey"
DETAIL:  Key (dag_id)=(test_dag_454) already exists.    
 scheduler [SQL: INSERT INTO serialized_dag (dag_id, fileloc, fileloc_hash, data, last_updated, dag_hash) VALUES (%(dag_id)s, %(fileloc)s, %(fileloc_hash)s, scheduler [parameters: {'dag_id': 'test_dag_454', 'fileloc': '/opt/airflow/dags/repo/test_dag_454.py', 'fileloc_hash': 14390114031793844, 'data': '{"__vers  scheduler (Background on this error at: http://sqlalche.me/e/13/gkpj)
</code></pre></div>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>