mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-03-06 18:03:14 +08:00
Format and lint with ruff (#1263)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from django.db.models import Max, prefetch_related_objects
|
||||
from django.db.models import prefetch_related_objects
|
||||
from django.templatetags.static import static
|
||||
from rest_framework import serializers
|
||||
from rest_framework.serializers import ListSerializer
|
||||
@@ -6,10 +6,10 @@ from rest_framework.serializers import ListSerializer
|
||||
from bookmarks.models import (
|
||||
Bookmark,
|
||||
BookmarkAsset,
|
||||
Tag,
|
||||
build_tag_string,
|
||||
UserProfile,
|
||||
BookmarkBundle,
|
||||
Tag,
|
||||
UserProfile,
|
||||
build_tag_string,
|
||||
)
|
||||
from bookmarks.services import bookmarks, bundles
|
||||
from bookmarks.services.tags import get_or_create_tag
|
||||
@@ -56,7 +56,7 @@ class BookmarkBundleSerializer(serializers.ModelSerializer):
|
||||
|
||||
def create(self, validated_data):
|
||||
bundle = BookmarkBundle(**validated_data)
|
||||
bundle.order = validated_data["order"] if "order" in validated_data else None
|
||||
bundle.order = validated_data.get("order", None)
|
||||
return bundles.create_bundle(bundle, self.context["user"])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user