from ..models import VulnerabilityItem
from django.db.models import Avg


def getAllVulnerabilities():
    return VulnerabilityItem.objects.all()


def deleteFixedVulnerability(id):
    VulnerabilityItem.objects.get(id=id).delete()
    return VulnerabilityItem.objects.all()


def getOnlyHostname():
    return VulnerabilityItem.objects.values('asset_hostname').annotate(avg_cvss
        =Avg('vulnerability_cvss')).order_by('-avg_cvss')

983a434c6cf4bb012018cf1b329f06f1ef4fcbda
<mask token>


def getOnlyHostname():
    return VulnerabilityItem.objects.values('asset_hostname').annotate(avg_cvss
        =Avg('vulnerability_cvss')).order_by('-avg_cvss')

<mask token>


def getAllVulnerabilities():
    return VulnerabilityItem.objects.all()


<mask token>


def getOnlyHostname():
    return VulnerabilityItem.objects.values('asset_hostname').annotate(avg_cvss
        =Avg('vulnerability_cvss')).order_by('-avg_cvss')

<mask token>


def getAllVulnerabilities():
    return VulnerabilityItem.objects.all()


def deleteFixedVulnerability(id):
    VulnerabilityItem.objects.get(id=id).delete()
    return VulnerabilityItem.objects.all()


def getOnlyHostname():
    return VulnerabilityItem.objects.values('asset_hostname').annotate(avg_cvss
        =Avg('vulnerability_cvss')).order_by('-avg_cvss')

from ..models import VulnerabilityItem
from django.db.models import Avg


def getAllVulnerabilities():
    return VulnerabilityItem.objects.all()


def deleteFixedVulnerability(id):
    VulnerabilityItem.objects.get(id=id).delete()
    return VulnerabilityItem.objects.all()


def getOnlyHostname():
    return VulnerabilityItem.objects.values('asset_hostname').annotate(avg_cvss
        =Avg('vulnerability_cvss')).order_by('-avg_cvss')
