This commit is contained in:
Ross
2024-01-04 15:24:46 +00:00
parent 5dafcf5533
commit a35f92ef2e
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ def check_images_hashes(request, hashes: List[str]):
for hash in hashes: for hash in hashes:
try: try:
print(hash) # TOOD also check against uncategorised dicoms?
series_image = SeriesImage.objects.get(image_blake3_hash=hash) series_image = SeriesImage.objects.get(image_blake3_hash=hash)
data = { data = {
"id": series_image.pk, "id": series_image.pk,
+4 -4
View File
@@ -258,11 +258,11 @@ class SeriesImageBase(models.Model):
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
"""Override save method to add image hash""" """Override save method to add image hash"""
if self.image: if self.image:
if not self.image_md5_hash: #if not self.image_md5_hash:
image_hash, is_dicom = get_image_hash(self.image, hash_type="md5", direct_pixel_data=False) # image_hash, is_dicom = get_image_hash(self.image, hash_type="md5", direct_pixel_data=False)
self.is_dicom = is_dicom # self.is_dicom = is_dicom
self.image_md5_hash = image_hash # self.image_md5_hash = image_hash
if not self.image_blake3_hash: if not self.image_blake3_hash:
image_blake3_hash, is_dicom = get_image_hash(self.image, hash_type="blake3", direct_pixel_data=True) image_blake3_hash, is_dicom = get_image_hash(self.image, hash_type="blake3", direct_pixel_data=True)
@@ -18,14 +18,14 @@
<thead> <thead>
{% if group_type == "cid" %} {% if group_type == "cid" %}
<tr><th>Email</th><th>CID</th><th>Passcode</th></tr> <tr><th>Name</th><th>Email</th><th>CID</th><th>Passcode</th></tr>
{% else %} {% else %}
<tr><th>User</th></tr> <tr><th>User</th></tr>
{% endif %} {% endif %}
</thead> </thead>
{% for user in users %} {% for user in users %}
{% if group_type == "cid" %} {% if group_type == "cid" %}
<tr><td>{{user.email}}</td><td>{{user.cid}}</td><td>{{user.passcode}}</td></tr> <tr><td>{{user.name}}</td><td>{{user.email}}</td><td>{{user.cid}}</td><td>{{user.passcode}}</td></tr>
{% else %} {% else %}
<tr><td>{{user.username}}</td></tr> <tr><td>{{user.username}}</td></tr>
{% endif %} {% endif %}