Skip to content

Commit

Permalink
default package
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Dec 22, 2023
1 parent bfa45ae commit af7c57d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -6643,6 +6643,7 @@ def AssignPackage(self, request=None, userID=None, data=None, DeleteID=None):
DockerPackagesDelete.delete()
except:
pass

adminNames = ACLManager.loadAllUsers(userID)
dockerpackages = DockerPackages.objects.all()
assignpackage = PackageAssignment.objects.all()
Expand Down Expand Up @@ -6788,9 +6789,13 @@ def AddAssignment(self, userID=None, data=None):
package = data['package']
user = data['user']

docker_package = DockerPackages.objects.get(pk=int(package))
userobj = Administrator.objects.get(userName=user)

delasg = PackageAssignment.objects.get(user=userobj)
delasg.delete()

docker_package = DockerPackages.objects.get(pk=int(package))

sv = PackageAssignment(user=userobj, package=docker_package)
sv.save()

Expand Down

0 comments on commit af7c57d

Please sign in to comment.