'insert series if missing'

def insert_series(self, series):

    if (not frappe.db.get_value(u'Series', series, u'name', order_by=u'name')):
        frappe.db.sql(u'insert    into    tabSeries    (name,    current)    values    (%s,    0)', series)
