Skip to content

Commit

Permalink
Merge pull request #51 from UMCUGenetics/hotfix/v3.3.1
Browse files Browse the repository at this point in the history
v3.3.1 - Hotifx - Speed up custom panel page
  • Loading branch information
rernst authored Oct 21, 2021
2 parents be3dca0 + 5b6fcd5 commit 45555a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ExonCov/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
from wtforms.ext.sqlalchemy.fields import QuerySelectMultipleField, QuerySelectField
from wtforms.fields import SelectField, TextAreaField, StringField, BooleanField, FloatField
from wtforms import validators
import datetime

from .models import Sample, SampleSet, Gene, GeneAlias, PanelVersion, Panel


# Query factories
def all_samples():
"""Query factory for all samples."""
return Sample.query.all()
#return Sample.query.all()
return Sample.query.filter(Sample.name.like('%C%')).filter(Sample.import_date >= datetime.date.today() - datetime.timedelta(days=365*2)).all()


def active_sample_sets():
Expand Down
5 changes: 5 additions & 0 deletions ExonCov/templates/custom_panel_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
{% block header %}Custom gene panel{% endblock %}

{% block body %}
<div class="alert alert-warning" role="alert">
Because of performance issues we have temporay disabled custom panel creation for 'parent samples' and samples older than 2 years.<br>
Please contact <b>[email protected]</b> if you would like to create a custom panel containing a 'parent sample' or sample older than 2 years.
</div>

<div class="well">
<form method="POST" action="{{ url_for('custom_panel_new') }}" class="form-horizontal">
{{ form.csrf_token }}
Expand Down

0 comments on commit 45555a4

Please sign in to comment.