'Called by the typeclass system the very first time the channel
is saved to the database. Generally, don\'t overload this but
the hooks called by this method.'

def at_first_save(self):

    self.at_channel_creation()
    self.attributes.add('log_file', ('channel_%s.log' % self.key))
    if hasattr(self, '_createdict'):
        cdict = self._createdict
        if (not cdict.get('key')):
            if (not self.db_key):
                self.db_key = ('#i' % self.dbid)
        elif (cdict['key'] and (self.key != cdict['key'])):
            self.key = cdict['key']
        if cdict.get('aliases'):
            self.aliases.add(cdict['aliases'])
        if cdict.get('locks'):
            self.locks.add(cdict['locks'])
        if cdict.get('keep_log'):
            self.attributes.add('keep_log', cdict['keep_log'])
        if cdict.get('desc'):
            self.attributes.add('desc', cdict['desc'])
