def delete_external_locations_from_draft(request, pk, ext_loc_pk):
    data = delete(
        request,
        APPLICATIONS_URL + pk + "/external_locations/" + ext_loc_pk + "/")
    if data.status_code == HTTPStatus.BAD_REQUEST:
        return data.json(), data.status_code
    else:
        return {}, data.status_code
def delete_draft(request, pk):
    data = delete(request, DRAFTS_URL + pk)
    return data.json(), data.status_code
Exemple #3
0
def delete_goods_type_document(request, pk, good_pk):
    data = delete(
        request,
        APPLICATIONS_URL + pk + GOODSTYPE_URL + str(good_pk) + DOCUMENT_URL)
    return data.status_code
Exemple #4
0
def delete_goods_type(request, app_pk, good_pk):
    data = delete(request,
                  APPLICATIONS_URL + app_pk + GOODSTYPE_URL + good_pk + "/")
    return data.status_code
Exemple #5
0
def delete_application_preexisting_good(request, good_on_application_pk):
    response = delete(
        request,
        APPLICATIONS_URL + "good-on-application/" + good_on_application_pk)
    return response.status_code
Exemple #6
0
def delete_additional_party_document(request, pk, doc_pk):
    data = delete(
        request,
        APPLICATIONS_URL + pk + ADDITIONAL_DOCUMENT_URL + str(doc_pk) + "/")
    return data.status_code
Exemple #7
0
def delete_party_document(request, application_pk, obj_pk):
    data = delete(
        request, APPLICATIONS_URL + application_pk + PARTIES_URL +
        str(obj_pk) + DOCUMENT_URL)
    return data.status_code
Exemple #8
0
def delete_party(request, application_pk, obj_pk=None):
    return delete(
        request,
        f"{APPLICATIONS_URL}{application_pk}{PARTIES_URL}{str(obj_pk)}/"
    ).status_code
Exemple #9
0
def delete_application(request, pk):
    data = delete(request, APPLICATIONS_URL + str(pk))
    return data.json(), data.status_code
Exemple #10
0
def delete_good_document(request, pk, doc_pk):
    data = delete(request, GOODS_URL + pk + DOCUMENTS_URL + doc_pk)
    return data.json(), data.status_code
Exemple #11
0
def delete_good(request, pk):
    data = delete(request, GOODS_URL + pk)
    return data.json(), data.status_code
Exemple #12
0
def delete_case_officer(request, pk, *args):
    data = delete(request, CASE_URL + str(pk) + CASE_OFFICER_URL)
    return data.json(), data.status_code
Exemple #13
0
def clear_final_advice(request, case_pk):
    data = delete(request, CASE_URL + case_pk + FINAL_ADVICE_URL)
    return data.json(), data.status_code
Exemple #14
0
def clear_team_advice(request, case_pk):
    data = delete(request, CASE_URL + case_pk + TEAM_ADVICE_URL)
    return data.json(), data.status_code
Exemple #15
0
def delete_case_document(request, pk, s3_key):
    data = delete(request, CASE_URL + pk + DOCUMENTS_URL + s3_key)
    return data.json(), data.status_code