Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Fixed font icons and biomarkers can be shared #58

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

GonzzaG
Copy link
Collaborator

@GonzzaG GonzzaG commented Dec 4, 2024

No description provided.

only_successful = self.request.GET.get('onlySuccessful') == 'true'
biomarkers = Biomarker.objects.filter(user=self.request.user)
biomarkers = Biomarker.objects.filter(
Q(is_public=True) | Q(user=user) | Q(shared_institutions__institutionadministration__user=user)).distinct()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acá la condición me parece que está mal. Está devolviendo los que son públicos, ó los que pertenecen al usuario, o los que están compartidos con una institución de la cual el usuario es admin. Me parece que tendría que compartir con las instituciones en las que está el usuario, independientementes de que sea admin o no!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en la condicion 'Q(shared_institutions__institutionadministration__user=user)' no significa que trae los que estan compartidos con la institucion a la que el usuario pertenece?.
Porque hice las pruebas y me traia si el usuario pertenecia a esa institucion por mas que no le pertenezca el biomarker o no sea admin. Tambien devolvia cuando era admin por mas que no le pertenezca. la condicion de si era admin la borre porque era lo que me devolvia mal la ultima vez. No se si me estoy confundiendo

@@ -60,14 +62,15 @@ class Biomarker(models.Model):
cnas: QuerySet['CNAIdentifier']
mirnas: QuerySet['MiRNAIdentifier']
mrnas: QuerySet['MRNAIdentifier']

is_public = models.BooleanField(blank=False, null=False, default=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agregar una línea vacía arriba para distinguir rápido entre los tipos y los campos de esta clase

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corregido!

@Genarito Genarito merged commit 0064cf9 into v5.0.0 Dec 5, 2024
1 check passed
@Genarito Genarito deleted the gonza branch December 5, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants