Group fix, add on duplicate plugin event

pull/1504/head
Piero Toffanin 2024-05-28 13:22:00 -04:00
rodzic 4aed7d5382
commit 8feb820e1c
4 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -444,6 +444,10 @@ class Task(models.Model):
logger.warning("Task {} doesn't have folder, will skip copying".format(self))
self.project.owner.profile.clear_used_quota_cache()
from app.plugins import signals as plugin_signals
plugin_signals.task_duplicated.send_robust(sender=self.__class__, task_id=task.id)
return task
except Exception as e:
logger.warning("Cannot duplicate task: {}".format(str(e)))

Wyświetl plik

@ -5,5 +5,6 @@ task_removing = django.dispatch.Signal(providing_args=["task_id"])
task_removed = django.dispatch.Signal(providing_args=["task_id"])
task_failed = django.dispatch.Signal(providing_args=["task_id"])
task_resizing_images = django.dispatch.Signal(providing_args=["task_id"])
task_duplicated = django.dispatch.Signal(providing_args=["task_id"])
processing_node_removed = django.dispatch.Signal(providing_args=["processing_node_id"])

Wyświetl plik

@ -54,7 +54,7 @@ class AnnotationLayer extends React.Component{
layer._map.setView(layer._latlng, 22);
}
if (layer.getPopup()) layer.openPopup();
// if (layer.getPopup()) layer.openPopup();
}
handleDelete = () => {

Wyświetl plik

@ -651,7 +651,7 @@ _('Example:'),
name: name || "",
icon: "fa fa-sticky-note fa-fw"
};
if (this.props.tiles.length > 1 && opts.task){
if (this.props.tiles.length > 1 && task){
meta.group = {id: task.id, name: task.name};
}
layer[Symbol.for("meta")] = meta;