Skip to content

Commit

Permalink
chore: Syntax changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Puerto committed Feb 12, 2025
1 parent a6f410d commit d88e14e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
class Migration(migrations.Migration):

dependencies = [
('user_workspaces_server', '0017_sharedworkspacemapping_datetime_share_created'),
("user_workspaces_server", "0017_sharedworkspacemapping_datetime_share_created"),
]

operations = [
migrations.AddField(
model_name='workspace',
name='datetime_last_job_launch',
model_name="workspace",
name="datetime_last_job_launch",
field=models.DateTimeField(null=True),
),
migrations.AddField(
model_name='workspace',
name='datetime_last_modified',
model_name="workspace",
name="datetime_last_modified",
field=models.DateTimeField(null=True),
),
]
1 change: 1 addition & 0 deletions src/user_workspaces_server/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.contrib.auth.models import User
from django.db import models


class Workspace(models.Model):
class Status(models.TextChoices):
IDLE = "idle"
Expand Down
4 changes: 1 addition & 3 deletions src/user_workspaces_server/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ def initialize_shared_workspace(shared_workspace_mapping_id: int):
def check_main_storage_user(user):
main_storage = apps.get_app_config("user_workspaces_server").main_storage

external_user_mapping = main_storage.storage_user_authentication.has_permission(
user
)
external_user_mapping = main_storage.storage_user_authentication.has_permission(user)

if not external_user_mapping:
logger.exception(f"User {user} could not be authenticated on {main_storage}.")
Expand Down
4 changes: 3 additions & 1 deletion src/user_workspaces_server/views/user_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def get(self, request):
first_last=Concat("first_name", Value(" "), "last_name")
).filter(Q(first_last__icontains=search) | Q(email__icontains=search))

users = list(users.exclude(username=request.user.username).all().values(*self.return_user_fields))
users = list(
users.exclude(username=request.user.username).all().values(*self.return_user_fields)
)

response = {"message": "Successful.", "success": True, "data": {"users": []}}

Expand Down

0 comments on commit d88e14e

Please sign in to comment.