Explorar el Código

cmd_acc: fix use of % inside store procedure create statement

- GH #15
Daniel-Constantin Mierla hace 2 años
padre
commit
daf0cbde95
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      kamcli/commands/cmd_acc.py

+ 1 - 1
kamcli/commands/cmd_acc.py

@@ -392,7 +392,7 @@ def acc_rates_proc_create(ctx):
             SET rate_record = 0;
             SELECT 1, rate_unit, time_unit INTO rate_record, v_rate_unit, v_time_unit
                     FROM billing_rates
-                    WHERE rate_group=rgroup AND v_dst_username LIKE concat(prefix, '%')
+                    WHERE rate_group=rgroup AND v_dst_username LIKE concat(prefix, '%%')
                     ORDER BY prefix DESC LIMIT 1;
             IF rate_record = 1 THEN
                 SET vx_cost = v_rate_unit * CEIL(v_duration/v_time_unit);