Skip to content

Commit

Permalink
deploy: cc514a4
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsmkn committed Dec 2, 2023
1 parent c4f2f62 commit 605c436
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _modules/grandchallenge/evaluation/models.html
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,11 @@ <h1>Source code for grandchallenge.evaluation.models</h1><div class="highlight">
<span class="k">class</span> <span class="nc">EvaluationUserObjectPermission</span><span class="p">(</span><span class="n">UserObjectPermissionBase</span><span class="p">):</span>
<span class="n">content_object</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">Evaluation</span><span class="p">,</span> <span class="n">on_delete</span><span class="o">=</span><span class="n">models</span><span class="o">.</span><span class="n">CASCADE</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">save</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span>
<span class="s2">&quot;User permissions should not be assigned for this model&quot;</span>
<span class="p">)</span>


<span class="k">class</span> <span class="nc">EvaluationGroupObjectPermission</span><span class="p">(</span><span class="n">GroupObjectPermissionBase</span><span class="p">):</span>
<span class="n">content_object</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="n">Evaluation</span><span class="p">,</span> <span class="n">on_delete</span><span class="o">=</span><span class="n">models</span><span class="o">.</span><span class="n">CASCADE</span><span class="p">)</span>
Expand Down

0 comments on commit 605c436

Please sign in to comment.