maquinaweb-shared-auth 0.2.25__py3-none-any.whl → 0.2.26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of maquinaweb-shared-auth might be problematic. Click here for more details.
- maquinaweb_shared_auth-0.2.26.dist-info/METADATA +1002 -0
- {maquinaweb_shared_auth-0.2.25.dist-info → maquinaweb_shared_auth-0.2.26.dist-info}/RECORD +6 -6
- shared_auth/models.py +1 -1
- shared_auth/serializers.py +3 -1
- maquinaweb_shared_auth-0.2.25.dist-info/METADATA +0 -1017
- {maquinaweb_shared_auth-0.2.25.dist-info → maquinaweb_shared_auth-0.2.26.dist-info}/WHEEL +0 -0
- {maquinaweb_shared_auth-0.2.25.dist-info → maquinaweb_shared_auth-0.2.26.dist-info}/top_level.txt +0 -0
|
@@ -8,14 +8,14 @@ shared_auth/fields.py,sha256=RAcmFh1D_nkbai_7t_OrPZhfhAipesy5kKnEj4LUvvM,1254
|
|
|
8
8
|
shared_auth/managers.py,sha256=xRj8d5r2Q5pBi36dQAOasS7EPvUUehb0eFbA-sAuzxY,6727
|
|
9
9
|
shared_auth/middleware.py,sha256=72GF8kGijbhw98v2Q-1sXBXk-7Bamfyvypm9h8xLX_I,6112
|
|
10
10
|
shared_auth/mixins.py,sha256=BSYNTWYjLRGuxfy7x-uAaNZmrTMsm67ogAQzjrU2DoQ,7388
|
|
11
|
-
shared_auth/models.py,sha256=
|
|
11
|
+
shared_auth/models.py,sha256=xlaCmxA_9j8Gacq6xzfUEd7I-lPj6HMhnjJ0lncwtIQ,6563
|
|
12
12
|
shared_auth/permissions.py,sha256=FNIp12ePOUlXVp26zNMAyEtzX9kwyP7RuNIgaaCXtPA,2671
|
|
13
13
|
shared_auth/router.py,sha256=zYidJ7j40lQLrhkCtAQAp-rQLhua_UF0X7SDzYRcV5w,668
|
|
14
|
-
shared_auth/serializers.py,sha256=
|
|
14
|
+
shared_auth/serializers.py,sha256=h50UhgOJ6Z6HNtxWjv6OK-Z9F_DOuV-PcCAg6FCzBtU,5125
|
|
15
15
|
shared_auth/storage_backend.py,sha256=Eqkjz8aF5UrOpRwYl-J0Td95IObfxnJ8eLQDJVFM3Io,184
|
|
16
16
|
shared_auth/urls.py,sha256=591wWEWJPaHEGkcOZ8yvfgxddRyOcZLgOc0vNtF7XRI,289
|
|
17
17
|
shared_auth/views.py,sha256=2hyLnYSWUscfq-jVcskt-ukzDt4vg6IXeKjRDRu9RXk,1519
|
|
18
|
-
maquinaweb_shared_auth-0.2.
|
|
19
|
-
maquinaweb_shared_auth-0.2.
|
|
20
|
-
maquinaweb_shared_auth-0.2.
|
|
21
|
-
maquinaweb_shared_auth-0.2.
|
|
18
|
+
maquinaweb_shared_auth-0.2.26.dist-info/METADATA,sha256=tvK9JcMpKSKctbaQyd59YH5ih0jrT33nvwc-XJIQJh0,26331
|
|
19
|
+
maquinaweb_shared_auth-0.2.26.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
maquinaweb_shared_auth-0.2.26.dist-info/top_level.txt,sha256=msyYRy02ZV7zz7GR1raUI5LXGFIFn2TIkgkeKZqKufE,12
|
|
21
|
+
maquinaweb_shared_auth-0.2.26.dist-info/RECORD,,
|
shared_auth/models.py
CHANGED
|
@@ -67,7 +67,7 @@ class SharedOrganization(models.Model):
|
|
|
67
67
|
telephone = models.CharField(max_length=50, blank=True, null=True)
|
|
68
68
|
cellphone = models.CharField(max_length=50, blank=True, null=True)
|
|
69
69
|
email = models.EmailField(blank=True, null=True)
|
|
70
|
-
image_organization = models.ImageField(storage=Storage,upload_to=organization_image_path, null=True)
|
|
70
|
+
image_organization = models.ImageField(storage=Storage, upload_to=organization_image_path, null=True)
|
|
71
71
|
|
|
72
72
|
# Relacionamentos
|
|
73
73
|
main_organization_id = models.IntegerField(null=True, blank=True)
|
shared_auth/serializers.py
CHANGED
|
@@ -38,6 +38,7 @@ class OrganizationSerializerMixin(serializers.ModelSerializer):
|
|
|
38
38
|
"id": org.pk,
|
|
39
39
|
"name": org.name,
|
|
40
40
|
"fantasy_name": org.fantasy_name,
|
|
41
|
+
"image_organization": org.image_organization.url if org.image_organization else None,
|
|
41
42
|
"cnpj": org.cnpj,
|
|
42
43
|
"email": org.email,
|
|
43
44
|
"telephone": org.telephone,
|
|
@@ -99,11 +100,12 @@ class UserSerializerMixin(serializers.ModelSerializer):
|
|
|
99
100
|
def get_user(self, obj):
|
|
100
101
|
"""Retorna dados do usuário como objeto"""
|
|
101
102
|
try:
|
|
102
|
-
user = obj.user
|
|
103
|
+
user: User = obj.user
|
|
103
104
|
return {
|
|
104
105
|
"id": user.pk,
|
|
105
106
|
"username": user.username,
|
|
106
107
|
"email": user.email,
|
|
108
|
+
"avatar": user.avatar.url if user.avatar else None,
|
|
107
109
|
"first_name": user.first_name,
|
|
108
110
|
"last_name": user.last_name,
|
|
109
111
|
"full_name": user.get_full_name(),
|