Skip to content

Commit

Permalink
fix: getMyAgent fails due to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Aug 11, 2024
1 parent 1a1c2b4 commit 87d5f47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/cli/bin/idle_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Future<T> waitFor<T>(Database db, Future<T?> Function() get) async {

Future<void> command(FileSystem fs, Database db, ArgResults argResults) async {
final api = await waitForApi(db, getPriority: () => networkPriorityLow);
final agentSymbol = await waitFor(db, () => db.getAgentSymbol());
final agent = await waitFor(db, () => db.getAgent(symbol: agentSymbol));
final agent = await waitFor(db, () => db.getMyAgent());

final systemSymbol = agent.headquarters.system;
var queue = IdleQueue();
Expand Down
3 changes: 2 additions & 1 deletion packages/db/lib/src/agent.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import 'package:types/types.dart';
Query agentBySymbolQuery(String agentSymbol) => Query(
'SELECT * FROM agent_ WHERE symbol = @symbol',
parameters: {
'symbol': agentSymbol,
// TODO(eseidel): use an AgentSymbol type.
'symbol': agentSymbol.toUpperCase(),
},
);

Expand Down

0 comments on commit 87d5f47

Please sign in to comment.