Update by natay on Tue Oct 24 17:18:36 EDT 2017 from natay
@@ -3,17 +3,18 @@ from biostar.tools import defaults
from engine.models import Project, User
from django.core import management
+
def create(owner, name=defaults.PROJECT_NAME, summary=defaults.PROJECT_SUMMARY,
add=False, json=None, template=None, create_job=False, usage=defaults.USAGE, analysis_usage=defaults.USAGE):
project = Project.objects.create(owner=owner, name=name, summary=summary, usage=usage)
project.save()
+
if add:
assert json and template
assert isinstance(json, str) and isinstance(template, str)
management.call_command('analysis', template=template, id=project.id, create_job=create_job, json=json,
usage=analysis_usage)
- return
