SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit bd315d8b authored by George Katsikas's avatar George Katsikas :goat:
Browse files

block actions for streams waiting offer acceptance

parent 66a45a16
No related branches found
No related tags found
No related merge requests found
...@@ -498,6 +498,7 @@ class Command(BaseCommand): ...@@ -498,6 +498,7 @@ class Command(BaseCommand):
# Create the repos # Create the repos
repos_to_be_created = repos.filter( repos_to_be_created = repos.filter(
status=ProofsRepository.PROOFS_REPO_UNINITIALIZED status=ProofsRepository.PROOFS_REPO_UNINITIALIZED
stream__in_stasis=False
) )
for repo in repos_to_be_created: for repo in repos_to_be_created:
try: try:
......
...@@ -16,6 +16,7 @@ from django.db.models.functions import Concat ...@@ -16,6 +16,7 @@ from django.db.models.functions import Concat
from django.conf import settings from django.conf import settings
from common.utils import latinise from common.utils import latinise
from submissions.models.decision import EditorialDecision
from .constants import ( from .constants import (
PRODUCTION_STREAM_STATUS, PRODUCTION_STREAM_STATUS,
...@@ -128,6 +129,13 @@ class ProductionStream(models.Model): ...@@ -128,6 +129,13 @@ class ProductionStream(models.Model):
def completed(self): def completed(self):
return self.status == PRODUCTION_STREAM_COMPLETED return self.status == PRODUCTION_STREAM_COMPLETED
@cached_property
def in_stasis(self):
return (
self.submission.editorial_decision.status
== EditorialDecision.AWAITING_PUBOFFER_ACCEPTANCE
)
@property @property
def latest_activity(self): def latest_activity(self):
if self.events.last(): if self.events.last():
......
<details id="productionstream-{{ productionstream.id }}-details" <details id="productionstream-{{ productionstream.id }}-details" class="border border-2 mx-3 p-2 bg-primary bg-opacity-10
class="border border-2 mx-3 p-2 bg-primary bg-opacity-10"> {% if productionstream.in_stasis %}bg-opacity-25 bg-secondary pe-none{% endif %}
">
<summary class="list-none"> <summary class="list-none">
{% include "production/_productionstream_details_summary_contents.html" with productionstream=productionstream %} {% include "production/_productionstream_details_summary_contents.html" with productionstream=productionstream %}
</summary> </summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment