amfs-http-server 0.3.1__tar.gz → 0.3.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amfs-http-server
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: AMFS HTTP/REST API server with SSE support
5
5
  License-Expression: Apache-2.0
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "amfs-http-server"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "AMFS HTTP/REST API server with SSE support"
5
5
  requires-python = ">=3.11"
6
6
  license = "Apache-2.0"
@@ -438,16 +438,6 @@ async def search_entries(
438
438
  except TypeError:
439
439
  results = mem._adapter.search(sq)
440
440
 
441
- if req.query and not getattr(mem._adapter, "_has_search_tsv", False):
442
- query_lower = req.query.lower()
443
- results = [
444
- e
445
- for e in results
446
- if query_lower in e.key.lower()
447
- or query_lower in str(e.value).lower()
448
- or query_lower in e.entity_path.lower()
449
- ]
450
-
451
441
  return [_entry_to_response(e) for e in results]
452
442
 
453
443
 
@@ -1726,6 +1716,11 @@ async def rollback(
1726
1716
 
1727
1717
  if target_event_id:
1728
1718
  event = mem._adapter.get_event(target_event_id, mem.namespace)
1719
+ if event is None and agent_id:
1720
+ for e in mem._adapter.list_events(agent_id, mem.namespace, limit=10000):
1721
+ if e.id == target_event_id:
1722
+ event = e
1723
+ break
1729
1724
  if event is None:
1730
1725
  raise HTTPException(status_code=404, detail="Event not found")
1731
1726
  timestamp = event.created_at