Merge branch 'seed-europe'

# Conflicts:
#	README.md
This commit is contained in:
Wolf committed 2026-09-28 15:27:48 +02:00
commit 3aee48997c
19 files changed
+3362 -1394

No files matched your search

+7 -5
View File
@@ -69,7 +69,7 @@ _VOTED_SCORE = ("MIN(1.0, s.score * CASE v.vote WHEN -1 THEN 0.5 "
#: nothing, so `vote` and `voted_at` are NULL: one query shape either way.
_WITH_VOTES = "LEFT JOIN role_votes v ON v.uid = roles.uid AND v.agent_id = ?"
_COMPANY_FIELDS = ("name", "domain", "status", "careers_url", "notes")
_COMPANY_FIELDS = ("name", "domain", "status", "careers_url", "notes", "ats", "country", "city")
#: A company as the store serves it: the row and the asked-for agent's affinity.
_COMPANY_SELECT = """SELECT c.*, COALESCE(ac.affinity, 0) AS affinity FROM companies c
@@ -967,7 +967,8 @@ class Store:
def add_company(self, name: str, *, key: str = "", domain: str = "",
status: str = "researching", careers_url: str = "",
notes: str = "") -> Company:
notes: str = "", ats: str = "", country: str = "",
city: str = "") -> Company:
"""Raises ValueError on a key already taken."""
name = name.strip()
key = key or company_key(name)
@@ -977,9 +978,10 @@ class Store:
try:
self._write(
"""INSERT INTO companies (key, name, domain, status, careers_url, notes,
created_at, updated_at)
VALUES (?,?,?,?,?,?,?,?)""",
(key, name, domain, status, careers_url, notes, stamp, stamp))
ats, country, city, created_at, updated_at)
VALUES (?,?,?,?,?,?,?,?,?,?,?)""",
(key, name, domain, status, careers_url, notes, ats, country, city,
stamp, stamp))
except sqlite3.IntegrityError as exc:
raise ValueError(f"company {key!r} already exists") from exc
return self._company(key)