home · contact · privacy
For -f raw on designs, preserve "==". master
authorPlom Heller <plom@plomlompom.com>
Fri, 14 Aug 2026 22:49:34 +0000 (00:49 +0200)
committerPlom Heller <plom@plomlompom.com>
Fri, 14 Aug 2026 22:49:34 +0000 (00:49 +0200)
src/bricksplom/misc.py

index 436ffa00451ac8f04c6a2aa4c67edb252f358383..e7d276de68210f60a74ddf3cc7582790d6d32635 100644 (file)
@@ -500,7 +500,8 @@ class BrickDesign(Textfiled, WithDb, Lookupable):
         attrs = []
         for attr_key in [k for k in BrickDesignData.sortables()
                          if k != 'description' and not self.at_default(k)]:
-            attrs += [f'{attr_key}{CHAR_ATTR_EQ}{getattr(self, attr_key)}']
+            operator = CHAR_ATTR_EQ * (1 + int(self.secured(attr_key)))
+            attrs += [f'{attr_key}{operator}{getattr(self, attr_key)}']
         attrs += [f'{SEP_DESIGN_DESC}{self.description}']
         return f'{raw}{CHAR_SEP_TOKEN.join(attrs)}'