Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Mar 18, 2024
1 parent b542c29 commit 28b8d57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _modules/apis_core/apis_entities/models.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ <h1>Source code for apis_core.apis_entities.models</h1><div class="highlight"><p
<div class="viewcode-block" id="AbstractEntity.merge_charfield">
<a class="viewcode-back" href="../../../modules/apis_core.apis_entities.html#apis_core.apis_entities.models.AbstractEntity.merge_charfield">[docs]</a>
<span class="k">def</span> <span class="nf">merge_charfield</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">,</span> <span class="n">field</span><span class="p">):</span>
<span class="nb">print</span><span class="p">(</span><span class="n">field</span><span class="p">)</span>
<span class="n">res</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">field</span><span class="o">.</span><span class="n">choices</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span><span class="p">):</span>
<span class="n">res</span> <span class="o">+=</span> <span class="s2">&quot; (&quot;</span> <span class="o">+</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;)&quot;</span>
<span class="n">otherres</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">res</span><span class="p">)</span>
<span class="k">if</span> <span class="n">otherres</span> <span class="o">!=</span> <span class="n">res</span><span class="p">:</span>
<span class="n">res</span> <span class="o">+=</span> <span class="sa">f</span><span class="s2">&quot; (</span><span class="si">{</span><span class="n">otherres</span><span class="si">}</span><span class="s2">)&quot;</span>
<span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">field</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">res</span><span class="p">)</span></div>


Expand Down

0 comments on commit 28b8d57

Please sign in to comment.