chore: remove stale commented codeblock (#5794)

This commit is contained in:
Robert Sparks 2023-06-09 16:56:09 -05:00 committed by GitHub
parent 67370952d9
commit c7d98a1cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -888,60 +888,6 @@ def group_photos(request, group_type=None, acronym=None):
'group':group }))
## XXX Remove after testing
# def get_or_create_initial_charter(group, group_type):
# charter_name = charter_name_for_group(group)
#
# try:
# charter = Document.objects.get(docalias__name=charter_name)
# except Document.DoesNotExist:
# charter = Document(
# name=charter_name,
# type_id="charter",
# title=group.name,
# group=group,
# abstract=group.name,
# rev="00-00",
# )
# charter.save()
# charter.set_state(State.objects.get(used=True, type="charter", slug="notrev"))
#
# # Create an alias as well
# DocAlias.objects.create(name=charter.name).docs.add(charter)
#
# return charter
#
# @login_required
# def submit_initial_charter(request, group_type=None, acronym=None):
#
# # This needs refactoring.
# # The signature assumed you could have groups with the same name, but with different types, which we do not allow.
# # Consequently, this can be called with an existing group acronym and a type
# # that doesn't match the existing group type. The code below essentially ignores the group_type argument.
# #
# # If possible, the use of get_or_create_initial_charter should be moved
# # directly into charter_submit, and this function should go away.
#
# if acronym==None:
# raise Http404
#
# group = get_object_or_404(Group, acronym=acronym)
# if not group.features.has_chartering_process:
# raise Http404
#
# # This is where we start ignoring the passed in group_type
# group_type = group.type_id
#
# if not can_manage_group(request.user, group):
# permission_denied(request, "You don't have permission to access this view")
#
# if not group.charter:
# group.charter = get_or_create_initial_charter(group, group_type)
# group.save()
#
# return redirect('ietf.doc.views_charter.submit', name=group.charter.name, option="initcharter")
@login_required
def edit(request, group_type=None, acronym=None, action="edit", field=None):
"""Edit or create a group, notifying parties as