forked from enviPath/enviPy
[Feature] Legacy API (#224)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#224
This commit is contained in:
@ -907,9 +907,10 @@ def package_model(request, package_uuid, model_uuid):
|
||||
if classify:
|
||||
from epdb.tasks import dispatch_eager, predict_simple
|
||||
|
||||
res = dispatch_eager(current_user, predict_simple, current_model.pk, stand_smiles)
|
||||
pred_res = dispatch_eager(
|
||||
current_user, predict_simple, current_model.pk, stand_smiles
|
||||
)
|
||||
|
||||
pred_res = current_model.predict(stand_smiles)
|
||||
res = []
|
||||
|
||||
for pr in pred_res:
|
||||
@ -1069,9 +1070,7 @@ def package(request, package_uuid):
|
||||
return redirect(s.SERVER_URL + "/package")
|
||||
elif hidden == "publish-package":
|
||||
for g in Group.objects.filter(public=True):
|
||||
PackageManager.update_permissions(
|
||||
current_user, current_package, g, Permission.READ[0]
|
||||
)
|
||||
PackageManager.grant_read(current_user, current_package, g)
|
||||
return redirect(current_package.url)
|
||||
elif hidden == "copy":
|
||||
object_to_copy = request.POST.get("object_to_copy")
|
||||
|
||||
Reference in New Issue
Block a user