Skip to content

Commit

Permalink
Merge pull request #2964 from moodpulse/fix_pyYaml
Browse files Browse the repository at this point in the history
Удаление PyYaml
  • Loading branch information
mikhailprivalov authored Jul 22, 2023
2 parents 18df386 + 9bf25b4 commit 3d43ae1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 151 deletions.
5 changes: 2 additions & 3 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from utils.data_verification import as_model, data_parse

import simplejson as json
import yaml
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Group, User
from django.core.cache import cache
Expand Down Expand Up @@ -177,10 +176,10 @@ def send(request):
result = {"ok": False}
try:
if request.method == "POST":
resdict = yaml.safe_load(request.POST["result"])
resdict = json.loads(request.POST["result"])
appkey = request.POST.get("key", "")
else:
resdict = yaml.safe_load(request.GET["result"])
resdict = json.loads(request.GET["result"])
appkey = request.GET.get("key", "")

astm_user = users.DoctorProfile.objects.filter(user__username="astm").first()
Expand Down
Loading

0 comments on commit 3d43ae1

Please sign in to comment.