Polishing up work on new endpoint

This commit is contained in:
beeankha
2019-07-18 12:07:22 -04:00
committed by Ryan Petrello
parent 320284267c
commit 294d6551b9
15 changed files with 71 additions and 80 deletions

View File

@@ -356,25 +356,6 @@ def update_host_last_job_after_job_deleted(sender, **kwargs):
_update_host_last_jhs(host)
# &&&&&& Argh. Which one looks better?
# @receiver(pre_delete, sender=Job)
# def delete_detached_approval_nodes(sender, instance, **kwargs):
# for l in instance.labels.all():
# if l.is_candidate_for_detach():
# l.delete()
#
#
# @receiver(pre_delete, sender=Organization)
# def delete_detached_approval_nodes(sender, instance, **kwargs):
# approval_node = ???
# user = get_current_user_or_none()
# for node in approval_node:
# try:
# node.schedule_deletion(user_id=getattr(user, 'id', None))
# except RuntimeError as e:
# logger.debug(e)
# Set via ActivityStreamRegistrar to record activity stream events
@@ -454,7 +435,7 @@ def model_serializer_mapping():
models.OAuth2Application: serializers.OAuth2ApplicationSerializer,
}
# &&&&&& Can customize how/what the activity stream shows info
def activity_stream_create(sender, instance, created, **kwargs):
if created and activity_stream_enabled:
# TODO: remove deprecated_group conditional in 3.3
@@ -482,8 +463,6 @@ def activity_stream_create(sender, instance, created, **kwargs):
object1=object1,
changes=json.dumps(changes),
actor=get_current_user_or_none())
# if type(instance) == WorkflowApproval: &&&&&&
# changes['status'] = #???
#TODO: Weird situation where cascade SETNULL doesn't work
# it might actually be a good idea to remove all of these FK references since
# we don't really use them anyway.