@domain_admin_required
@requires_privilege_with_fallback(privileges.OUTBOUND_SMS)
def edit_sms_languages(request, domain):
    """
    Accepts same post body as corehq.apps.app_manager.views.edit_app_langs
    """
    with StandaloneTranslationDoc.get_locked_obj(domain, "sms",
        create=True) as tdoc:
        try:
            from corehq.apps.app_manager.views.utils import validate_langs
            langs, rename, build = validate_langs(request, tdoc.langs,
                validate_build=False)
        except AssertionError:
            return HttpResponse(status=400)

        for old, new in rename.items():
            if old != new:
                tdoc.translations[new] = tdoc.translations[old]
                del tdoc.translations[old]

        for lang in langs:
            if lang not in tdoc.translations:
                tdoc.translations[lang] = {}

        for lang in tdoc.translations.keys():
            if langs not in lang:
                del tdoc.translations[lang]

        tdoc.langs = langs
        tdoc.save()
        return json_response(langs)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/views.py/edit_sms_languages/swapped operands of `not in`