def reflag_urlgenericscan(type):
    log.debug("Setting flags on UrlGenericScan type: %s" % type)
    UrlGenericScan.objects.all().filter(type=type).update(is_the_latest_scan=False)

    # get the latest scans